mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2024-12-28 07:45:51 -05:00
add FAQ for Using Hugo's Syntax highlighter "chroma"
This commit is contained in:
parent
9a25e81bb1
commit
4fad5dce34
@ -173,6 +173,15 @@ taxonomies:
|
|||||||
tag: tags
|
tag: tags
|
||||||
series: series
|
series: series
|
||||||
|
|
||||||
|
# markup:
|
||||||
|
# highlight:
|
||||||
|
# # anchorLineNos: true
|
||||||
|
# codeFences: true
|
||||||
|
# guessSyntax: true
|
||||||
|
# lineNos: true
|
||||||
|
# # noClasses: false
|
||||||
|
# style: monokai
|
||||||
|
|
||||||
privacy:
|
privacy:
|
||||||
vimeo:
|
vimeo:
|
||||||
disabled: false
|
disabled: false
|
||||||
|
@ -270,6 +270,43 @@ Add `#center` after image to center align an image
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Using Hugo's Syntax highlighter "chroma"
|
||||||
|
|
||||||
|
1. Disable Highlight.js in site `config.yml`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
params:
|
||||||
|
assets:
|
||||||
|
disableHLJS: true
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Set hugo's markdown styling in site `config.yml`
|
||||||
|
|
||||||
|
```yml
|
||||||
|
markup:
|
||||||
|
highlight:
|
||||||
|
# anchorLineNos: true
|
||||||
|
codeFences: true
|
||||||
|
guessSyntax: true
|
||||||
|
lineNos: true
|
||||||
|
# noClasses: false
|
||||||
|
style: monokai
|
||||||
|
```
|
||||||
|
|
||||||
|
3. If you want `lineNos: true`, the background won't be proper.
|
||||||
|
|
||||||
|
Add the following to `assets/css/extended/custom.css`
|
||||||
|
|
||||||
|
```css
|
||||||
|
.chroma {
|
||||||
|
background-color: unset;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
- [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)
|
- [Override a Hugo theme](https://zwbetz.com/override-a-hugo-theme/)
|
||||||
|
@ -196,6 +196,15 @@ menu:
|
|||||||
name: example.org
|
name: example.org
|
||||||
url: https://example.org
|
url: https://example.org
|
||||||
weight: 30
|
weight: 30
|
||||||
|
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
|
||||||
|
# markup:
|
||||||
|
# highlight:
|
||||||
|
# # anchorLineNos: true
|
||||||
|
# codeFences: true
|
||||||
|
# guessSyntax: true
|
||||||
|
# lineNos: true
|
||||||
|
# # noClasses: false
|
||||||
|
# style: monokai
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user