From 7559281f0abcb47b3ba272925c388b984c3dc0cb Mon Sep 17 00:00:00 2001 From: "cat.7" Date: Tue, 4 Jun 2024 16:06:59 +0800 Subject: [PATCH] # add post toc -3. --- gradle.properties | 2 +- settings.yaml | 16 +++++++++++++--- templates/post.html | 6 +++--- theme.yaml | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2f11ec3..dda11f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=1.2.2-beta.4 \ No newline at end of file +version=1.2.2 \ No newline at end of file diff --git a/settings.yaml b/settings.yaml index 963eb0c..11c67e8 100644 --- a/settings.yaml +++ b/settings.yaml @@ -16,11 +16,11 @@ spec: label: 主题favicon help: 注意:[Halo >> 设置 >> favicon]优先级更高 value: https://s2.loli.net/2024/05/29/YeBxEhvcPzpmD8u.png - - group: post - label: 文章详情 + - group: toc + label: 文章目录 formSchema: - $formkit: radio - name: toc + name: switch label: 目录展示 value: false options: @@ -28,6 +28,16 @@ spec: label: 展示 - value: false label: 隐藏 + - $formkit: attachment + name: js + label: JS 地址 + help: 文章目录生成JS, 默认为[tocbot.min.js], 可以替换为自定义JS文件 + value: https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.27.4/tocbot.min.js + - $formkit: attachment + name: css + label: CSS 地址 + help: 文章目录生成CSS, 默认为[tocbot.css], 可以替换为自定义css文件 + value: https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.27.4/tocbot.css - group: beian label: 备案信息 formSchema: diff --git a/templates/post.html b/templates/post.html index 6d6a224..76290ad 100644 --- a/templates/post.html +++ b/templates/post.html @@ -4,11 +4,11 @@ th:replace="~{modules/layout :: html(title = ${post.spec.title}, content = ~{::content}, _head = ~{::head}, _plugins = ~{::plugins})}" > - - + + - + diff --git a/theme.yaml b/theme.yaml index 17554d4..06037c7 100644 --- a/theme.yaml +++ b/theme.yaml @@ -13,5 +13,5 @@ spec: website: https://aiheiyo.top settingName: "Summer-Cat-setting" configMapName: "Summer-Cat-configMap" - version: 1.2.2-beta.4 + version: 1.2.2 require: 2.15.0