Skip to content

Commit

Permalink
fix: rename docsNav.reduceFontSize to docs.nav.reduceFontSize
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Aug 18, 2024
1 parent f8d1247 commit 5ce293e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ paypal = "razonyang"
[docs]
[docs.nav]
expand = false # Expand docs navigations.
reduceFontSize = true

[feeds]
# content = true
Expand Down Expand Up @@ -356,6 +357,3 @@ location = "Earth"
patreon = "razonyang"
paypal = "razonyang"
# rss = "" # Disable RSS link

# [docsNav]
# reduceFontSize = false
4 changes: 2 additions & 2 deletions exampleSite/content/docs/configuration/site-params/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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` 同时使用,这是因为它们无法识别优化后的元标签。
Original file line number Diff line number Diff line change
Expand Up @@ -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` 同時使用,這是因為它們無法識別優化後的元標簽。
2 changes: 1 addition & 1 deletion layouts/partials/docs/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</a>
</div>
<div class="docs-nav-subnavs border-start mt-2 collapse {{ if or $active $expand}} show{{ end }}{{ if $active }} border-primary{{ end }}" id="{{ $sectionId }}">
<div class="btn-toggle-nav fw-normal ms-2{{ cond (default true site.Params.docsNav.reduceFontSize) ` small` `` }}">
<div class="btn-toggle-nav fw-normal ms-2{{ cond (default true site.Params.docs.nav.reduceFontSize) ` small` `` }}">
{{ template "walk-nav" (dict "section" . "page" $page) }}
</div>
</div>
Expand Down

0 comments on commit 5ce293e

Please sign in to comment.