From 93db80120c4fe9f133e3c7c4032c9369cce18827 Mon Sep 17 00:00:00 2001 From: ikenxuan <2066855608@qq.com> Date: Tue, 23 Jul 2024 18:04:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E9=99=A4=E6=89=80=E6=9C=89inde?= =?UTF-8?q?x.md=E7=9A=84git=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=85=83?= =?UTF-8?q?=E7=B4=A0=20feat:=20=E6=B7=BB=E5=8A=A0=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.ts | 1 + docs/.vitepress/theme/index.ts | 22 +++++++++++++++++++++- docs/api/index.md | 3 +++ docs/event/index.md | 3 +++ docs/plugins/index.md | 3 +++ docs/start/index.md | 16 ++++++++++------ docs/start/start.md | 2 +- docs/utils/index.md | 3 +++ package.json | 1 + 9 files changed, 46 insertions(+), 8 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 35736e3c..5241660e 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -57,6 +57,7 @@ export default defineConfig({ repoURL: () => 'https://github.com/KarinJS/Karin', }), GitChangelogMarkdownSection({ + exclude: (id) => id.endsWith('index.md'), sections: { // 禁用页面历史 disableChangelog: false, diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index fd309444..251a8ee4 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -37,6 +37,8 @@ import { import '@nolebase/vitepress-plugin-page-properties/client/style.css' // 元素增强 import '@nolebase/vitepress-plugin-enhanced-mark/client/style.css' +// 页面底部评论 +import giscusTalk from 'vitepress-plugin-comment-with-giscus' export default { extends: DefaultTheme, @@ -96,9 +98,27 @@ export default { /** 响应式图片缩放 */ setup () { - const route = useRoute() // 获取前言和路由 + const route = useRoute() const { frontmatter } = useData() + // giscus配置 + giscusTalk({ + repo: 'KarinJS/Karin', //仓库 + repoId: 'R_kgDOLcebnw', //仓库ID + category: 'Announcements', // 讨论分类 + categoryId: 'DIC_kwDOLcebn84CeJZH', //讨论分类ID + mapping: 'pathname', + inputPosition: 'bottom', + lang: 'zh-CN', + }, + { + frontmatter, route + }, + //默认值为true,表示已启用,此参数可以忽略; + //如果为false,则表示未启用 + //您可以使用“comment:true”序言在页面上单独启用它 + true + ) // 代码块添加折叠 codeblocksFold({ route, frontmatter }, true, 400) diff --git a/docs/api/index.md b/docs/api/index.md index 4bcbcd74..8d4cf4fd 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,3 +1,6 @@ +--- +comment: false +--- # 目录 > 正在编写中,咕咕咕~ diff --git a/docs/event/index.md b/docs/event/index.md index a4ea1520..977432a4 100644 --- a/docs/event/index.md +++ b/docs/event/index.md @@ -1,3 +1,6 @@ +--- +comment: false +--- # 事件 --- diff --git a/docs/plugins/index.md b/docs/plugins/index.md index dc8fff70..89182a8e 100644 --- a/docs/plugins/index.md +++ b/docs/plugins/index.md @@ -1,3 +1,6 @@ +--- +comment: false +--- # 插件 ## 插件规范 diff --git a/docs/start/index.md b/docs/start/index.md index 89d5dea6..29d7cdc1 100644 --- a/docs/start/index.md +++ b/docs/start/index.md @@ -1,26 +1,30 @@ +--- +comment: false +--- # 目录 -::: tip 温馨提示 -如果文档中发现错误,或提交文档修改,或丰富本站文档,可点击页面底部的编辑按钮 -::: ### 快速开始
- + 第一次使用 Karin 而且晕头转向?来看看这份安装指引吧! ### 渲染器
- + Karin 的渲染器是独立的一个项目,需要单独安装噢 ### 插件
- + Karin 社区拥有众多开发者,开发了许多特色插件,你可以在插件市场找到你想要的插件~ +--- +::: tip 温馨提示 +如果文档中发现错误,或提交文档修改,或丰富本站文档,可点击页面底部的编辑按钮 +:::