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)) {