From 0333f52b8b0050bf8cb71281c7a63008117c987f Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Fri, 27 Sep 2024 17:26:05 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E6=9B=B4=E6=96=B0=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E6=A1=A3=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=BC=96=E5=8F=B7=E6=97=A0=E6=B3=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98=20(hugo-fixit/FixIt#505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/_default/markup.toml | 6 ------ config/_default/params.toml | 9 +++++++-- .../documentation/getting-started/configuration/index.md | 6 +++++- .../documentation/getting-started/configuration/index.md | 6 +++++- go.mod | 2 +- go.sum | 4 ++-- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/config/_default/markup.toml b/config/_default/markup.toml index 21d98b91..56b9e96f 100644 --- a/config/_default/markup.toml +++ b/config/_default/markup.toml @@ -14,9 +14,3 @@ [goldmark] _merge = "shallow" -# Table Of Contents settings -# 目录设置 -[tableOfContents] - ordered = false - startLevel = 2 - endLevel = 6 diff --git a/config/_default/params.toml b/config/_default/params.toml index 06a1f9bb..13d98806 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -806,6 +806,11 @@ disableThemeInject = false # FixIt 0.2.13 | NEW position of TOC ["left", "right"] # FixIt 0.2.13 | 新增 目录位置 ["left", "right"] position = "right" + # FixIt 0.3.12 | NEW supersede `markup.tableOfContents` settings + # FixIt 0.3.12 | 新增 取代 `markup.tableOfContents` 设置 + ordered = false + startLevel = 2 + endLevel = 6 # FixIt 0.2.13 | NEW Display a message at the beginning of an article to warn the reader that its content might be expired. # FixIt 0.2.13 | 新增 在文章开头显示提示信息,提醒读者文章内容可能过时。 [page.expirationReminder] @@ -825,8 +830,8 @@ disableThemeInject = false # FixIt 0.3.3 | NEW whether to capitalize automatic text of headings # FixIt 0.3.3 | 新增 是否自动大写标题 capitalize = true - # 配合 `markup.tableOfContents.ordered` 参数使用 - # used with `markup.tableOfContents.ordered` parameter + # FixIt 0.3.12 | CHANGED must set `params.page.toc.ordered` to true + # FixIt 0.3.12 | 更改 必须设置 `params.page.toc.ordered` 为 true [page.heading.number] # whether to enable auto heading numbering # 是否启用自动标题编号 diff --git a/content/en/documentation/getting-started/configuration/index.md b/content/en/documentation/getting-started/configuration/index.md index c5309840..5e7246e1 100644 --- a/content/en/documentation/getting-started/configuration/index.md +++ b/content/en/documentation/getting-started/configuration/index.md @@ -1354,6 +1354,10 @@ c4u auto = true # {{< version 0.2.13 >}} position of TOC ["left", "right"] position = "right" + # {{< version 0.3.12 >}} supersede `markup.tableOfContents` settings + ordered = false + startLevel = 2 + endLevel = 6 # {{< version 0.2.13 >}} Display a message at the beginning of an article to warn the reader that its content might be expired [params.page.expirationReminder] enable = false @@ -1367,7 +1371,7 @@ c4u [params.page.heading] # {{< version 0.3.6 >}} whether to capitalize automatic text of headings capitalize = false - # used with `markup.tableOfContents.ordered` parameter + # {{< version 0.3.12 changed >}} must set `params.page.toc.ordered` to true [params.page.heading.number] # whether to enable auto heading numbering enable = false diff --git a/content/zh-cn/documentation/getting-started/configuration/index.md b/content/zh-cn/documentation/getting-started/configuration/index.md index 89a7bdd3..7938031b 100644 --- a/content/zh-cn/documentation/getting-started/configuration/index.md +++ b/content/zh-cn/documentation/getting-started/configuration/index.md @@ -1345,6 +1345,10 @@ c4u auto = true # {{< version 0.2.13 >}} 目录位置 ["left", "right"] position = "right" + # {{< version 0.3.12 >}} 取代 `markup.tableOfContents` 设置 + ordered = false + startLevel = 2 + endLevel = 6 # {{< version 0.2.13 >}} 在文章开头显示提示信息,提醒读者文章内容可能过时 [params.page.expirationReminder] enable = false @@ -1358,7 +1362,7 @@ c4u [params.page.heading] # {{< version 0.3.6 >}} 是否自动大写标题 capitalize = false - # 配合 `markup.tableOfContents.ordered` 参数使用 + # {{< version 0.3.12 changed >}} 必须设置 `params.page.toc.ordered` 为 true [params.page.heading.number] # 是否启用自动标题编号 enable = false diff --git a/go.mod b/go.mod index df217784..ca538fb6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/hugo-fixit/docs go 1.20 require ( - github.com/hugo-fixit/FixIt v0.3.12-0.20240925102835-954d86432f3e // indirect + github.com/hugo-fixit/FixIt v0.3.12-0.20240927091017-456db3851b37 // indirect github.com/hugo-fixit/component-projects v1.1.3 // indirect github.com/hugo-fixit/shortcode-caniuse v1.1.3 // indirect github.com/hugo-fixit/shortcode-rewards v1.0.4 // indirect diff --git a/go.sum b/go.sum index dc81d6bf..60cbee02 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/hugo-fixit/FixIt v0.3.12-0.20240925102835-954d86432f3e h1:7a6PDPQVPr/Ch3MB6M6J4Bqa4RDB8YhcLuCIp9hUsn4= -github.com/hugo-fixit/FixIt v0.3.12-0.20240925102835-954d86432f3e/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= +github.com/hugo-fixit/FixIt v0.3.12-0.20240927091017-456db3851b37 h1:rSCRSgUN98Lv4aP9cG8SeJlwgWp5j/lPPHM3W+65gRs= +github.com/hugo-fixit/FixIt v0.3.12-0.20240927091017-456db3851b37/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU= github.com/hugo-fixit/component-projects v1.1.3 h1:iK6q07CpFsnnJGh8q2stVjv6Lr77dTM9o+P7LGDEYmE= github.com/hugo-fixit/component-projects v1.1.3/go.mod h1:nXW0R37REwpfwUD1I4RtB5QW71vw66nRyB9uEpYxr+c= github.com/hugo-fixit/shortcode-caniuse v1.1.3 h1:U1YBJz5SI/d1BBQhHcD0eVgJdCcpzK2usSizPiu+a4w=