From a87b93dc0ed5d7d978a4c7a761f14984d34dd142 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 21 Jul 2022 18:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E3=80=8A=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E7=AC=94=E8=80=85=E3=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 9 ++++-- repos/.vitepress/config/nav.ts | 11 ++++--- repos/.vitepress/config/sidebar.ts | 11 ++----- repos/.vitepress/config/theme.ts | 2 +- repos/.vitepress/theme/index.ts | 22 +++++++++++++- repos/about/index.md | 1 + repos/about/me.md | 46 +++++++++++++++++++++++------- repos/fragments/index.md | 1 + repos/issues/index.md | 1 + 9 files changed, 75 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 981c61422..70483280e 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,14 @@ "serve": "vitepress serve repos" }, "devDependencies": { - "vitepress": "^1.0.0-alpha.4", - "vue": "^3.2.37" + "vitepress": "^1.0.0-alpha.4" }, "dependencies": { + "@ant-design/icons-vue": "^6.1.0", + "@element-plus/icons-vue": "^2.0.6", + "ant-design-vue": "^3.2.10", + "element-plus": "^2.2.9", "fast-glob": "^3.2.11", - "element-plus": "^2.2.9" + "vue": "^3.2.37" } } diff --git a/repos/.vitepress/config/nav.ts b/repos/.vitepress/config/nav.ts index c8109004d..7be7346cf 100644 --- a/repos/.vitepress/config/nav.ts +++ b/repos/.vitepress/config/nav.ts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from 'vitepress' +import DefaultTheme from 'vitepress/theme' export const nav: DefaultTheme.Config['nav'] = [ { @@ -12,8 +12,11 @@ export const nav: DefaultTheme.Config['nav'] = [ activeMatch: '/fragments/' }, { - text: '关于知识库', - link: '/about/index', - activeMatch: '/about/', + text: '关于', + items: [ + { text: '关于知识库', link: '/about/index' }, + { text: '关于笔者', link: '/about/me' } + ], + activeMatch: '/about/' } ] \ No newline at end of file diff --git a/repos/.vitepress/config/sidebar.ts b/repos/.vitepress/config/sidebar.ts index 61f412d5e..b7db161bd 100644 --- a/repos/.vitepress/config/sidebar.ts +++ b/repos/.vitepress/config/sidebar.ts @@ -1,16 +1,9 @@ -import type { DefaultTheme } from 'vitepress' +import DefaultTheme from 'vitepress/theme' import { sync } from "fast-glob" export const sidebar: DefaultTheme.Config['sidebar'] = { '/issues/': getItems("issues"), - '/fragments/': getItems("fragments"), - '/about/': [ - { - items: [ - { text: '关于笔者', link: '/about/me' } - ] - } - ] + '/fragments/': getItems("fragments") } /** diff --git a/repos/.vitepress/config/theme.ts b/repos/.vitepress/config/theme.ts index a92d54de2..8215a2008 100644 --- a/repos/.vitepress/config/theme.ts +++ b/repos/.vitepress/config/theme.ts @@ -1,4 +1,4 @@ -import type { DefaultTheme } from 'vitepress' +import DefaultTheme from 'vitepress/theme' import { nav } from './nav' import { sidebar } from './sidebar' diff --git a/repos/.vitepress/theme/index.ts b/repos/.vitepress/theme/index.ts index deac68a3b..016de26f6 100644 --- a/repos/.vitepress/theme/index.ts +++ b/repos/.vitepress/theme/index.ts @@ -1,9 +1,29 @@ import DefaultTheme from 'vitepress/theme' +import ElementPlus from 'element-plus' +import "element-plus/dist/index.css" +import * as ElIcons from '@element-plus/icons-vue' +import Antd from 'ant-design-vue' +import 'ant-design-vue/dist/antd.css' +import * as AntdIcons from '@ant-design/icons-vue' + + import './custom.css' export default { ...DefaultTheme, enhanceApp({ app }) { - // register global components + // 全局注册ElementPlus的所有图标 + for (const [key, elIcon] of Object.entries(ElIcons)) { + app.component(key, elIcon) + } + // 全局注册ElementPlus + app.use(ElementPlus) + + // 全局注册Ant Design of Vue的所有图标 + for (const [key, antdIcon] of Object.entries(AntdIcons)) { + app.component(key, antdIcon) + } + // 全局注册Ant Design of Vue + app.use(Antd) } } \ No newline at end of file diff --git a/repos/about/index.md b/repos/about/index.md index 3f181b417..4023165a3 100644 --- a/repos/about/index.md +++ b/repos/about/index.md @@ -1,6 +1,7 @@ --- editLink: false lastUpdated: false +aside: false --- # 关于知识库 diff --git a/repos/about/me.md b/repos/about/me.md index 09b6e3de1..d87b82fc9 100644 --- a/repos/about/me.md +++ b/repos/about/me.md @@ -1,21 +1,45 @@ --- editLink: false lastUpdated: false +aside: false --- # 关于笔者 -::: warning 笔者说 +
-待续 +
+ + 个人主页 +   + + GitHub个人主页 +   + + 码云个人主页 +   + + CSDN个人主页 +   + + 语雀个人主页 +   + + 掘金个人主页 +   +
-::: - -| 平台 | 昵称 | 个人主页 | -| ------ | ---------------- | -------------------------------------- | -| GitHub | Charles7c | https://github.com/Charles7c | -| 码云 | Charles7c | https://gitee.com/Charles7c | -| CSDN | 查尔斯-BUG万象集 | https://blog.csdn.net/Charles_7c | -| 语雀 | 查尔斯 | https://www.yuque.com/charles7c | -| 掘金 | | https://juejin.cn/user/685744115170142 | +--- +- 👋 Hi, I’m Charles7c +- 🔭 I’m currently working on Java backend development +- 📫 How to reach me: [charles7c@126.com](mailto:charles7c@126.com) +- 📖 My motto: “东隅已逝,桑榆非晚。” +--- +
+ + + + + +
\ No newline at end of file diff --git a/repos/fragments/index.md b/repos/fragments/index.md index ecefb9fa8..89aaeb1ba 100644 --- a/repos/fragments/index.md +++ b/repos/fragments/index.md @@ -1,6 +1,7 @@ --- editLink: false lastUpdated: false +aside: false --- # "杂碎"逆袭史 diff --git a/repos/issues/index.md b/repos/issues/index.md index 153e66d1d..84ef21306 100644 --- a/repos/issues/index.md +++ b/repos/issues/index.md @@ -1,6 +1,7 @@ --- editLink: false lastUpdated: false +aside: false --- # Bug万象集