diff --git a/exampleSite/content/posts/usage/configuration.md b/exampleSite/content/posts/usage/configuration.md index 48e1d0c..6d0f173 100644 --- a/exampleSite/content/posts/usage/configuration.md +++ b/exampleSite/content/posts/usage/configuration.md @@ -121,6 +121,9 @@ enableRobotsTXT = true # bright spots while using the dark mode. geekblogDarkModeDim = false + # (Optional, default false) Enforce code blocks to always use the dark color theme. + geekblogDarkModeCode = false + # (Optional, default true) Display a "Back to top" link in the site footer. geekblogBackToTop = true @@ -250,6 +253,9 @@ params: # bright spots while using the dark mode. geekblogDarkModeDim: false + # (Optional, default false) Enforce code blocks to always use the dark color theme. + geekblogDarkModeCode: false + # (Optional, default true) Display a "Back to top" link in the site footer. geekblogBackToTop: true diff --git a/exampleSite/static/custom.css.example b/exampleSite/static/custom.css.example index b9ae4f9..3134d16 100644 --- a/exampleSite/static/custom.css.example +++ b/exampleSite/static/custom.css.example @@ -6,7 +6,7 @@ /* Light mode theming */ :root, -:root[color-mode="light"] { +:root[color-theme="light"] { --header-background: #4ec58a; --header-font-color: #ffffff; @@ -78,7 +78,7 @@ } /* Dark mode theming */ -:root[color-mode="dark"] { +:root[color-theme="dark"] { --header-background: #4ec58a; --header-font-color: #ffffff; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1d32640..6ddc4d4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,6 +4,7 @@ itemtype="http://schema.org/WebPage" lang="{{ .Site.Language.Lang }}" class="color-toggle-hidden" + {{ if default false .Site.Params.GeekblogDarkModeCode }}code-theme="dark"{{ end }} >
{{ partial "head/meta" . }} diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html index 35fb1f0..3bbcc82 100644 --- a/layouts/partials/site-header.html +++ b/layouts/partials/site-header.html @@ -17,7 +17,7 @@