From 576cb4dc2a49c95ff8505934b905cfc005a8273d Mon Sep 17 00:00:00 2001 From: Charles7c Date: Fri, 29 Jul 2022 16:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E9=BB=98=E8=AE=A4=E4=B8=BB=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E8=84=9A=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=90=8E=E7=BB=AD?= =?UTF-8?q?=E5=8F=AF=E6=8F=90=E4=BE=9B=E6=9B=B4=E5=A4=9A=E7=9A=84=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repos/.vitepress/config/theme.ts | 20 +++--- .../.vitepress/theme/components/Copyright.vue | 69 +++++++++++++++++++ .../.vitepress/theme/components/MyLayout.vue | 6 ++ 3 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 repos/.vitepress/theme/components/Copyright.vue diff --git a/repos/.vitepress/config/theme.ts b/repos/.vitepress/config/theme.ts index 38bfcbef7..acf041bd6 100644 --- a/repos/.vitepress/config/theme.ts +++ b/repos/.vitepress/config/theme.ts @@ -3,6 +3,9 @@ import { nav } from './nav' import { sidebar } from './sidebar' export const themeConfig: DefaultTheme.Config = { + nav, // 导航栏配置 + sidebar, // 侧边栏配置 + logo: '/logo.png', outlineTitle: '目录', // 右侧边栏的大纲标题文本配置 lastUpdatedText: '最后更新', // 最后更新时间文本配置, 需先配置lastUpdated为true @@ -16,11 +19,6 @@ export const themeConfig: DefaultTheme.Config = { pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path', text: '不妥之处,敬请雅正' }, - // 页脚配置 - footer: { - message: `京ICP备20003712号-2`, // 备案信息 - copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息 - }, // 全文搜索配置 algolia: { appId: 'DBZ0G9HBUY', @@ -31,15 +29,19 @@ export const themeConfig: DefaultTheme.Config = { socialLinks: [ { icon: 'github', link: 'https://github.com/Charles7c/charles7c.github.io' } ], - nav, // 导航栏配置 - sidebar, // 侧边栏配置 - // 文章元数据配置 + // 自定义扩展: 页脚配置 + footerConfig: { + showFooter: true, // 是否显示页脚 + recordNo: '津ICP备2022005864号-2', // 备案信息 + copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息 + }, + // 自定义扩展: 文章元数据配置 articleMetadataConfig: { author: '查尔斯', // 文章全局默认作者名称 authorLink: '/about/me' // 点击作者名时默认跳转的链接 }, - // 评论配置 + // 自定义扩展: 评论配置 commentConfig: { type: 'gitalk', options: { diff --git a/repos/.vitepress/theme/components/Copyright.vue b/repos/.vitepress/theme/components/Copyright.vue new file mode 100644 index 000000000..c9ccafcf5 --- /dev/null +++ b/repos/.vitepress/theme/components/Copyright.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/repos/.vitepress/theme/components/MyLayout.vue b/repos/.vitepress/theme/components/MyLayout.vue index a2a1eca2f..f22a5b200 100644 --- a/repos/.vitepress/theme/components/MyLayout.vue +++ b/repos/.vitepress/theme/components/MyLayout.vue @@ -3,14 +3,20 @@ +