diff --git a/config/_default/params.toml b/config/_default/params.toml index f1d28a78b..a7338dcf8 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -9,6 +9,8 @@ colorScheme = "congo" defaultAppearance = "light" # valid options: light or dark autoSwitchAppearance = true +defaultThemeColor = "#FFFFFF" + enableSearch = false enableCodeCopy = false enableImageLazyLoading = true diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index 26140b6d6..c773e64f1 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -129,6 +129,7 @@ Congoはテーマの機能を制御する多数の設定パラメーターを提 |Name|Default|Description| |---|---|---| |`colorScheme`|`"congo"`|使用する配色。有効な値は `congo` (デフォルト), `avocado`, `cherry`, `fire`, `ocean`, `sapphire`, `slate` です。詳しくは [カラースキーム]({{< ref "getting-started#カラースキーム" >}})セクションを参照してください。| +|`defaultThemeColor`|`"#FFFFFF"`|まだ翻訳されていません。| |`defaultAppearance`|`"light"`|デフォルトのテーマ外観、 `light` または `dark` のいずれか。| |`autoSwitchAppearance`|`true`|テーマの外観を訪問者のオペレーティングシステムの設定に基づいて自動的に切り替えるかどうか。常に `defaultAppearance` を使うようにするには `false` を設定します。| |`enableSearch`|`false`|サイト内検索を有効にするかどうか。検索機能を有効にするには `true` を設定します。検索機能は、[サイト設定](#サイト設定)の `outputs.home` が正しく設定されているかどうかに依存することに注意してください。| diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 47e558016..537f86f1c 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -129,6 +129,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |Name|Default|Description| |---|---|---| |`colorScheme`|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `cherry`, `fire`, `ocean`, `sapphire` and `slate`. Refer to the [Colour Schemes]({{< ref "getting-started#colour-schemes" >}}) section for more details.| +|`defaultThemeColor`|`"#FFFFFF"`|The original value (before any scripts modify it) to use for the `theme-color` meta tag. The meta tag will be changed based on the theme (`light` or `dark`) but it is useful for services that source the original value this tag to display an accent color (e.g. Discord)| |`defaultAppearance`|`"light"`|The default theme appearance, either `light` or `dark`.| |`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.| |`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.| diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index 76f8feb02..486d078dc 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -125,6 +125,7 @@ Congo 提供了大量的配置参数,用于控制主题的功能。下表概 |名称|默认值|描述| |---|---|---| |`colorScheme`|`"congo"`|要使用的主题颜色方案。有效值为 `congo`(默认)、`avocado`、`cherry`、`fire`、`ocean`、`sapphire` 和 `slate`。有关详细信息,请参阅[颜色方案]({{< ref "getting-started#颜色方案" >}})部分。| +|`defaultThemeColor`|`"#FFFFFF`|`theme-color` meta 标签的原值(在脚本修改它之前)。meta 标签会根据所选主题而变化(`light` 或 `dark`),但是一些软件(例如 Discord)会使用该标签的原值来显示主题色。| |`defaultAppearance`|`"light"`|默认的主题外观,可以是 `light` 或 `dark`。| |`autoSwitchAppearance`|`true`|主题外观是否根据访问者的操作系统首选项自动切换。设置为 `false` 以始终使用 `defaultAppearance`。| |`enableSearch`|`false`|是否启用站内搜索。设置为 `true` 以启用搜索功能。请注意,搜索功能取决于 [站点配置](#site-configuration) 中的 `outputs.home` 设置正确。| diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b364b7854..efb9c8344 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,7 +1,7 @@ - + {{/* Title */}} {{ if .IsHome -}} {{ .Site.Title | emojify }}