From fdad66d1978becd445c8069245a59a05d2687f31 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sun, 14 Aug 2022 13:14:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9AGitalk=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collect-article-data.mjs | 2 +- docs/.vitepress/config/theme.ts | 11 ---- docs/.vitepress/theme/MyLayout.vue | 2 - .../components/{dynamic => }/Archive.vue | 4 +- docs/.vitepress/theme/components/Comment.vue | 54 +++++++++++++++---- .../theme/components/{dynamic => }/Tag.vue | 4 +- docs/.vitepress/theme/index.ts | 6 +-- docs/vite.config.js | 2 +- package.json | 13 ++--- yarn.lock | 5 ++ 10 files changed, 62 insertions(+), 41 deletions(-) rename docs/.vitepress/theme/components/{dynamic => }/Archive.vue (98%) rename docs/.vitepress/theme/components/{dynamic => }/Tag.vue (99%) diff --git a/collect-article-data.mjs b/collect-article-data.mjs index c35c84b25..4187084c3 100644 --- a/collect-article-data.mjs +++ b/collect-article-data.mjs @@ -12,7 +12,7 @@ const articleData = await Promise.all( const { data, path } = file return { ...data, - path: path.replace(/\.md$/, '.html').replace('./repos/', '') + path: path.replace(/\.md$/, '.html').replace('./docs/', '') } }) ) diff --git a/docs/.vitepress/config/theme.ts b/docs/.vitepress/config/theme.ts index 355687446..d179e60ab 100644 --- a/docs/.vitepress/config/theme.ts +++ b/docs/.vitepress/config/theme.ts @@ -46,17 +46,6 @@ export const themeConfig: DefaultTheme.Config = { // 自定义扩展: 评论配置 commentConfig: { type: 'gitalk', - options: { - clientID: '1de126ce1fbdbe049709', - clientSecret: '035fe49874a43e5cefc28a99b7e40b1925319c62', - repo: 'charles7c.github.io-comments', - owner: 'Charles7c', - admin: ['Charles7c'], - language: 'zh-CN', - distractionFreeMode: false, - // 默认: https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token - proxy: 'https://cors-server-ecru.vercel.app/github_access_token' - }, showComment: true // 是否显示评论 } } \ No newline at end of file diff --git a/docs/.vitepress/theme/MyLayout.vue b/docs/.vitepress/theme/MyLayout.vue index 46271b7db..4cb4c5c95 100644 --- a/docs/.vitepress/theme/MyLayout.vue +++ b/docs/.vitepress/theme/MyLayout.vue @@ -13,8 +13,6 @@ import DefaultTheme from 'vitepress/theme' import { useData } from 'vitepress' import md5 from 'blueimp-md5' -import Comment from './components/Comment.vue' -import Footer from './components/Footer.vue' const { Layout } = DefaultTheme const { page, theme, frontmatter } = useData() diff --git a/docs/.vitepress/theme/components/dynamic/Archive.vue b/docs/.vitepress/theme/components/Archive.vue similarity index 98% rename from docs/.vitepress/theme/components/dynamic/Archive.vue rename to docs/.vitepress/theme/components/Archive.vue index 8d1d744f3..5b7f58e55 100644 --- a/docs/.vitepress/theme/components/dynamic/Archive.vue +++ b/docs/.vitepress/theme/components/Archive.vue @@ -81,8 +81,8 @@ diff --git a/docs/.vitepress/theme/components/dynamic/Tag.vue b/docs/.vitepress/theme/components/Tag.vue similarity index 99% rename from docs/.vitepress/theme/components/dynamic/Tag.vue rename to docs/.vitepress/theme/components/Tag.vue index dce902ae0..b3e15ffbb 100644 --- a/docs/.vitepress/theme/components/dynamic/Tag.vue +++ b/docs/.vitepress/theme/components/Tag.vue @@ -60,8 +60,8 @@