diff options
| author | Reorx <novoreorx@gmail.com> | 2022-04-15 00:55:41 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-04-15 00:55:41 +0800 |
| commit | 33c1ba12e22ec939cd4c85186c243b6617a28527 (patch) | |
| tree | e08a98331141711727c94ca47653853ecde34872 /exampleSite/content/docs/faq.md | |
| parent | 60380fe684fb6db6c75ce9f4863f1047e6566649 (diff) | |
use hugo's builtin Chroma for code highlight
Diffstat (limited to 'exampleSite/content/docs/faq.md')
| -rw-r--r-- | exampleSite/content/docs/faq.md | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/exampleSite/content/docs/faq.md b/exampleSite/content/docs/faq.md index 0a2f879..6ec0fd9 100644 --- a/exampleSite/content/docs/faq.md +++ b/exampleSite/content/docs/faq.md @@ -250,32 +250,15 @@ ex. ## Using Hugo's Syntax highlighter "chroma" -1. Set hugo's markdown styling in site `config.yml` - - ```yml - markup: - highlight: - # anchorLineNos: true - codeFences: true - guessSyntax: true - lineNos: true - # noClasses: false - style: monokai - ``` - -2. 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` +Set hugo's markdown styling in site `config.yml` - ```css - .chroma { - background-color: unset; - } - ``` +```yml +markup: + highlight: + noClasses: false +``` - More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight) +`noClasses` has to be `false` to make highlight color follows the theme. --- |
