mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
update FAQ for Using Hugo's Syntax highlighter "chroma"
This commit is contained in:
parent
5265710f2d
commit
49f2c2632b
@ -274,16 +274,16 @@ Add `#center` after image to center align an image
|
||||
|
||||
1. Disable Highlight.js in site `config.yml`
|
||||
|
||||
```yml
|
||||
params:
|
||||
```yml
|
||||
params:
|
||||
assets:
|
||||
disableHLJS: true
|
||||
```
|
||||
```
|
||||
|
||||
2. Set hugo's markdown styling in site `config.yml`
|
||||
|
||||
```yml
|
||||
markup:
|
||||
```yml
|
||||
markup:
|
||||
highlight:
|
||||
# anchorLineNos: true
|
||||
codeFences: true
|
||||
@ -291,17 +291,19 @@ markup:
|
||||
lineNos: true
|
||||
# noClasses: false
|
||||
style: monokai
|
||||
```
|
||||
```
|
||||
|
||||
3. If you want `lineNos: true`, the background won't be proper.
|
||||
This will only work with `noClasses: false` or `pygmentsUseClasses: true`.
|
||||
Read [Generate Syntax Highlighter CSS](https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css)
|
||||
|
||||
Add the following to `assets/css/extended/custom.css`
|
||||
Add the following to `assets/css/extended/custom.css`
|
||||
|
||||
```css
|
||||
.chroma {
|
||||
```css
|
||||
.chroma {
|
||||
background-color: unset;
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user