From 49f2c2632bbbf226864300d420449ef9c6a5dd97 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Fri, 22 Jan 2021 11:32:52 +0530 Subject: [PATCH] update FAQ for Using Hugo's Syntax highlighter "chroma" --- content/posts/papermod/papermod-faq.md | 44 ++++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/content/posts/papermod/papermod-faq.md b/content/posts/papermod/papermod-faq.md index 16a4d24f..42163167 100644 --- a/content/posts/papermod/papermod-faq.md +++ b/content/posts/papermod/papermod-faq.md @@ -274,34 +274,36 @@ Add `#center` after image to center align an image 1. Disable Highlight.js in site `config.yml` -```yml -params: - assets: - disableHLJS: true -``` + ```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 -``` + ```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. + 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 { - background-color: unset; -} -``` + ```css + .chroma { + background-color: unset; + } + ``` More Info : [Configure Markup - Highlight](https://gohugo.io/getting-started/configuration-markup#highlight)