From 037fdd3264b2be707d4a51906bde9c868a173e40 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Mon, 14 Apr 2025 23:58:33 +0200 Subject: [PATCH] Add light theme for syntax hightlighting --- .gitignore | 4 ++++ config.toml | 6 +++++- templates/headers.html | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f9989794a..c97e6b3e0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,10 @@ /site /public +# generated by zola +/static/styles/syntax-theme-dark.css +/static/styles/syntax-theme-light.css + # these are old compiled sass files, people might still have them lying arouynd /static/styles/vendor.css /static/styles/app.css diff --git a/config.toml b/config.toml index 32b0acd6c..76aeff886 100644 --- a/config.toml +++ b/config.toml @@ -8,7 +8,11 @@ build_search_index = false [markdown] highlight_code = true -highlight_theme = "boron" +highlight_theme = "css" +highlight_themes_css = [ + { theme = "boron", filename = "styles/syntax-theme-dark.css" }, + { theme = "OneHalfLight", filename = "styles/syntax-theme-light.css" }, +] bottom_footnotes = true insert_anchor_links = "left" extra_syntaxes_and_themes = ["syntaxes"] diff --git a/templates/headers.html b/templates/headers.html index 6b93b7361..8a66d93ed 100644 --- a/templates/headers.html +++ b/templates/headers.html @@ -19,6 +19,8 @@ + +