diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 84d0e1ae..761fb287 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -484,7 +484,7 @@ enableEmoji = true BuyMeaCoffee = "" Linktree = "" QQ = "" - QQGroup = "" + QQGroup = "814031017" Diaspora = "" CSDN = "" Email = "xxxx@xxxx.com" @@ -540,6 +540,11 @@ enableEmoji = true # whether to add external Icon for external links automatically since v0.2.14 # 是否自动显示外链图标 since v0.2.14 externalIcon = true + # FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. since v0.2.14 + # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. + # 默认情况下,FixIt 只会在主页的 HTML 头中注入主题元标记。since v0.2.14 + # 您可以将其关闭,但如果您不这样做,我们将不胜感激,因为这是观察 FixIt 受欢迎程度上升的好方法。 + disableThemeInject = false # Header config # 页面头部导航栏配置 diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index a4fab655..8edea764 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -221,6 +221,9 @@ Please open the code block below to view the complete sample configuration :(far enablePWA = true # {{< version 0.2.14 >}} whether to add external Icon for external links automatically externalIcon = false + # {{< version 0.2.14 >}} FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. + # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. + disableThemeInject = false # {{< version 0.2.0 >}} App icon config [params.app] diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 166ef718..ed6bde52 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -223,6 +223,9 @@ hugo enablePWA = true # {{< version 0.2.14 >}} 是否自动显示外链图标 externalIcon = false + # {{< version 0.2.14 >}} 默认情况下,FixIt 只会在主页的 HTML 头中注入主题元标记。 + # 您可以将其关闭,但如果您不这样做,我们将不胜感激,因为这是观察 FixIt 受欢迎程度上升的好方法。 + disableThemeInject = false # {{< version 0.2.0 >}} 应用图标配置 [params.app] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index bbb54b79..498de75a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,8 +3,11 @@ + {{ if (eq .Kind "home") | and (ne .Site.Params.disableThemeInject true) }} + + {{ end }} - + @@ -19,7 +22,6 @@ {{- /* Check theme isDark before body rendering */ -}} {{- $theme := .Site.Params.defaulttheme -}} <script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ $theme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ $theme }}' === 'dark')) && document.body.setAttribute('theme', 'dark');</script> - {{- /* Body wrapper */ -}} <div class="wrapper"> {{- partial "header.html" . -}}