From 5ce293eecb5de853a16456a592423b2ae277ebcb Mon Sep 17 00:00:00 2001 From: razonyang Date: Mon, 19 Aug 2024 01:15:48 +0800 Subject: [PATCH] fix: rename `docsNav.reduceFontSize` to `docs.nav.reduceFontSize` --- exampleSite/config/_default/params.toml | 4 +--- exampleSite/content/docs/configuration/site-params/index.md | 4 ++-- .../content/docs/configuration/site-params/index.zh-hans.md | 4 ++-- .../content/docs/configuration/site-params/index.zh-hant.md | 4 ++-- layouts/partials/docs/nav.html | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 3103e939..6144d0a0 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -292,6 +292,7 @@ paypal = "razonyang" [docs] [docs.nav] expand = false # Expand docs navigations. +reduceFontSize = true [feeds] # content = true @@ -356,6 +357,3 @@ location = "Earth" patreon = "razonyang" paypal = "razonyang" # rss = "" # Disable RSS link - -# [docsNav] -# reduceFontSize = false diff --git a/exampleSite/content/docs/configuration/site-params/index.md b/exampleSite/content/docs/configuration/site-params/index.md index 73e560ee..039f2154 100644 --- a/exampleSite/content/docs/configuration/site-params/index.md +++ b/exampleSite/content/docs/configuration/site-params/index.md @@ -162,7 +162,7 @@ The site parameters are located in `config/_default/params.toml` by default. | `actionsPanel` | Object | - | | `actionsPanel.disabled` | Boolean | `false` | Disable actions panel. | `repo` | Object | - | See [Repository widget]({{< ref "docs/widgets/repository" >}}). -| `docsNav` | Object | - | Docs layout navigation. -| `docsNav.reduceFontSize` | Boolean | `true` | When `false`, don't reduce the font size of children navigation. +| `docs.nav` | Object | - | Docs layout navigation. +| `docs.nav.reduceFontSize` | Boolean | `true` | When `false`, don't reduce the font size of children navigation. > Except the Google webmaster tool, the other webmaster tools cannot work with `hugo --minify`, because they cannot recognize the minified meta tag. diff --git a/exampleSite/content/docs/configuration/site-params/index.zh-hans.md b/exampleSite/content/docs/configuration/site-params/index.zh-hans.md index d6cfe86e..f02b16c3 100644 --- a/exampleSite/content/docs/configuration/site-params/index.zh-hans.md +++ b/exampleSite/content/docs/configuration/site-params/index.zh-hans.md @@ -165,7 +165,7 @@ authors = ["RazonYang"] | `actionsPanel` | Object | - | | `actionsPanel.disabled` | Boolean | `false` | 禁用 actions panel。 | `repo` | Object | - | See [Repository widget]({{< ref "docs/widgets/repository" >}}). -| `docsNav` | Object | - | 文档布局导航。 -| `docsNav.reduceFontSize` | Boolean | `true` | 为 `false` 时,不缩小子导航菜单的字体大小。 +| `docs.nav` | Object | - | 文档布局导航。 +| `docs.nav.reduceFontSize` | Boolean | `true` | 为 `false` 时,不缩小子导航菜单的字体大小。 > 除了 Google 站长工具外,其他搜索引擎站长工具无法与 `hugo --minify` 同时使用,这是因为它们无法识别优化后的元标签。 diff --git a/exampleSite/content/docs/configuration/site-params/index.zh-hant.md b/exampleSite/content/docs/configuration/site-params/index.zh-hant.md index eb71eff6..f426f0b7 100644 --- a/exampleSite/content/docs/configuration/site-params/index.zh-hant.md +++ b/exampleSite/content/docs/configuration/site-params/index.zh-hant.md @@ -165,7 +165,7 @@ authors = ["RazonYang"] | `actionsPanel` | Object | - | | `actionsPanel.disabled` | Boolean | `false` | 禁用 actions panel。 | `repo` | Object | - | See [Repository widget]({{< ref "docs/widgets/repository" >}}). -| `docsNav` | Object | - | 文檔佈局導航。 -| `docsNav.reduceFontSize` | Boolean | `true` | 為 `false` 時,不縮小子導航菜單的字體大小。 +| `docs.nav` | Object | - | 文檔佈局導航。 +| `docs.nav.reduceFontSize` | Boolean | `true` | 為 `false` 時,不縮小子導航菜單的字體大小。 > 除了 Google 站長工具外,其他搜索引擎站長工具無法與 `hugo --minify` 同時使用,這是因為它們無法識別優化後的元標簽。 diff --git a/layouts/partials/docs/nav.html b/layouts/partials/docs/nav.html index 46281ea0..726adb50 100644 --- a/layouts/partials/docs/nav.html +++ b/layouts/partials/docs/nav.html @@ -35,7 +35,7 @@
-
+
{{ template "walk-nav" (dict "section" . "page" $page) }}