From 31485fa81b3da8b22798b8ff389f155dd0557ab9 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 18 Oct 2021 23:42:26 -0400 Subject: config.toml: use classes instead of inline styles for syntax highlighting --- config.toml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/config.toml b/config.toml index 4d97c77..978dda7 100644 --- a/config.toml +++ b/config.toml @@ -21,3 +21,39 @@ theme = "hugo-pt2021" posts = "/:year/:month/:day/:slug" articles = "/articles/:slug" projects = "/:slug" + +[markup] + [markup.tableOfContents] + startLevel = 2 + endLevel = 4 + ordered = false + + # set chrome syntax highlighting; use all defaults except + # for one directive: + # + # noClasses = false + # + # This tells chroma to use classes instead of inline styles + # for syntax highlighting. + # + # After that I ran `hugo genchromaclasses` to generate a static + # stylesheet for chroma: + # + # hugo gen chromaclasses --style=monokai > \ + # themes/hugo-pt2021/assets/chroma.css + # + # And finally, I imported chroma.css into my style.sass: + # + # / + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = '' + lineAnchors = '' + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = false + style = 'monokai' + tabWidth = 4 -- cgit v1.2.3