From 92cc6fb8afcd4bc9912792ba11fbcf2c9c3cccc9 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 21 Jul 2022 22:01:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BB=E9=A2=98=E7=9A=84=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repos/.vitepress/config/theme.ts | 9 ++-- .../.vitepress/theme/components/Copyright.vue | 50 +++++++++++++++++++ .../.vitepress/theme/components/MyLayout.vue | 17 +++++++ repos/.vitepress/theme/index.ts | 2 + 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 repos/.vitepress/theme/components/Copyright.vue create mode 100644 repos/.vitepress/theme/components/MyLayout.vue diff --git a/repos/.vitepress/config/theme.ts b/repos/.vitepress/config/theme.ts index 8215a2008..bef0e417e 100644 --- a/repos/.vitepress/config/theme.ts +++ b/repos/.vitepress/config/theme.ts @@ -15,10 +15,11 @@ export const themeConfig: DefaultTheme.Config = { pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path', text: '在 GitHub 上编辑此页面' }, - // 版权标识 - footer: { - message: 'Released under the MIT License.', - copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` + // 页脚配置, 由于vitepress官方没有此计划, 所以自行定制 + footerConfig: { + showFooter: true, // 是否显示页脚 + message: `京ICP备20003712号-2`, // 备案信息 + copyright : `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息 }, // 全文搜索 algolia: { diff --git a/repos/.vitepress/theme/components/Copyright.vue b/repos/.vitepress/theme/components/Copyright.vue new file mode 100644 index 000000000..0467e0531 --- /dev/null +++ b/repos/.vitepress/theme/components/Copyright.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/repos/.vitepress/theme/components/MyLayout.vue b/repos/.vitepress/theme/components/MyLayout.vue new file mode 100644 index 000000000..8a1ff6e0d --- /dev/null +++ b/repos/.vitepress/theme/components/MyLayout.vue @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/repos/.vitepress/theme/index.ts b/repos/.vitepress/theme/index.ts index 016de26f6..e953d38d6 100644 --- a/repos/.vitepress/theme/index.ts +++ b/repos/.vitepress/theme/index.ts @@ -1,4 +1,5 @@ import DefaultTheme from 'vitepress/theme' +import MyLayout from "./components/MyLayout.vue" import ElementPlus from 'element-plus' import "element-plus/dist/index.css" import * as ElIcons from '@element-plus/icons-vue' @@ -11,6 +12,7 @@ import './custom.css' export default { ...DefaultTheme, + Layout: MyLayout, enhanceApp({ app }) { // 全局注册ElementPlus的所有图标 for (const [key, elIcon] of Object.entries(ElIcons)) {