From 6a3c5bbdd62e65e1fb7281efad247e8a7b75127b Mon Sep 17 00:00:00 2001 From: Charles7c Date: Fri, 12 Aug 2022 23:55:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E3=80=8A=E6=88=91?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=AD=BE=E3=80=8B=E5=A2=9E=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E4=BA=91=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++-- collect-article-data.mjs | 1 - package.json | 4 +- repos/.vitepress/config.ts | 1 - repos/.vitepress/config/theme.ts | 2 +- repos/.vitepress/theme/components/Comment.vue | 1 - repos/.vitepress/theme/components/Footer.vue | 2 +- .../.vitepress/theme/components/WordCloud.vue | 56 ++++++++++++++++++ .../theme/components/dynamic/Tag.vue | 54 ++++++++++------- repos/.vitepress/theme/index.ts | 2 + repos/public/screenshot/主页.png | Bin 390718 -> 395171 bytes repos/public/screenshot/我的标签1.png | Bin 93466 -> 124308 bytes repos/public/screenshot/我的标签2.png | Bin 75427 -> 117412 bytes 13 files changed, 102 insertions(+), 31 deletions(-) create mode 100644 repos/.vitepress/theme/components/WordCloud.vue diff --git a/README.md b/README.md index 68983293f..1f25948ef 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ yarn build - [x] 主页美化:参照 vite 文档主页进行美化 - [x] 自定义页脚:支持ICP备案号、公安备案号、版权信息配置(符合大陆网站审核要求) - [x] 文章元数据信息显示:文章标题下显示作者、发布时间、所属分类、标签列表等信息 -- [x] 《我的标签》:模仿语雀标签页风格,https://www.yuque.com/r/语雀用户名/tags?tag= +- [x] 《我的标签》:模仿语雀标签页风格,https://www.yuque.com/r/语雀用户名/tags?tag=,另有标签云展示 - [x] 《我的归档》:自定义时间轴,展示历史文章数据。年份前可展示生肖,可按分类、标签筛选 - [x] 更多细节优化:敬请发现 - [ ] 文章评论:Gitalk @@ -75,12 +75,14 @@ yarn build - [vuejs/vitepress](https://github.com/vuejs/vitepress) (本知识库基于 vitepress 构建) - [vitejs/vite](https://github.com/vitejs/vite) (参考主页美化) -- [brc-dd/vitepress-with-arco](https://github.com/brc-dd/vitepress-with-arco) (感谢 vitepress 维护者 brc-dd 的帮助) -- [brc-dd/vitepress-blog-demo](https://github.com/brc-dd/vitepress-blog-demo) - [windicss/docs](https://github.com/windicss/docs) (参考配置文件拆分) -- [dingqianwen/my-blog](https://github.com/dingqianwen/my-blog) (参考 Gitalk 配置暗黑主题) +- [brc-dd/vitepress-blog-demo](https://github.com/brc-dd/vitepress-blog-demo) (感谢 vitepress 维护者 brc-dd 的热心帮助) +- [brc-dd/vitepress-with-arco](https://github.com/brc-dd/vitepress-with-arco) - [clark-cui/vitepress-blog-zaun](https://github.com/clark-cui/vitepress-blog-zaun) (参考文章标签的数据处理方案) +- [dingqianwen/my-blog](https://github.com/dingqianwen/my-blog) (参考 Gitalk 配置暗黑主题) +- [xiaoxian521/pure-admin-utils-docs](https://github.com/xiaoxian521/pure-admin-utils-docs) (参考词云组件的使用) - [arco-design/arco-design-vue](https://github.com/arco-design/arco-design-vue) (使用部分组件及图标) +- [antvis/G2plot](https://github.com/antvis/G2plot) (使用部分图表) - ...... ## License diff --git a/collect-article-data.mjs b/collect-article-data.mjs index 9b31e40c4..0e382eddd 100644 --- a/collect-article-data.mjs +++ b/collect-article-data.mjs @@ -2,7 +2,6 @@ import glob from 'fast-glob' import matter from 'gray-matter' import fs from 'node:fs/promises' -// 感谢: https://github.com/brc-dd/vitepress-blog-demo const articleData = await Promise.all( glob.sync('./repos/**/*.md', { onlyFiles: true, diff --git a/package.json b/package.json index 756658a01..502f3724d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,9 @@ "vitepress": "^1.0.0-alpha.4" }, "dependencies": { - "@arco-design/web-vue": "^2.34.1", + "@antv/g2plot": "^2.4.20", + "@arco-design/web-vue": "^2.35.0", + "@pureadmin/utils": "^0.0.33", "blueimp-md5": "^2.19.0", "dayjs": "^1.11.4", "fast-glob": "^3.2.11", diff --git a/repos/.vitepress/config.ts b/repos/.vitepress/config.ts index 2fda7fe9c..d0891191e 100644 --- a/repos/.vitepress/config.ts +++ b/repos/.vitepress/config.ts @@ -4,7 +4,6 @@ import { head } from './config/head' import { markdown } from './config/markdown' import { themeConfig } from './config/theme' -// 感谢: https://github.com/windicss/docs export default defineConfig({ lang: metaData.lang, title: metaData.title, diff --git a/repos/.vitepress/config/theme.ts b/repos/.vitepress/config/theme.ts index 9f1c11a48..f93ae6432 100644 --- a/repos/.vitepress/config/theme.ts +++ b/repos/.vitepress/config/theme.ts @@ -34,7 +34,7 @@ export const themeConfig: DefaultTheme.Config = { footerConfig: { showFooter: true, // 是否显示页脚 icpRecordCode: '津ICP备2022005864号-2', // ICP备案号 - publicSecurityRecordCode: '津公网安备 12011202000677号', // 联网备案号 + publicSecurityRecordCode: '津公网安备12011202000677号', // 联网备案号 copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息 }, // 自定义扩展: 文章元数据配置 diff --git a/repos/.vitepress/theme/components/Comment.vue b/repos/.vitepress/theme/components/Comment.vue index 827ba2297..a2a47a6c8 100644 --- a/repos/.vitepress/theme/components/Comment.vue +++ b/repos/.vitepress/theme/components/Comment.vue @@ -44,7 +44,6 @@ function renderGitalk(options) { gitalk.render('comment-container') /* - // 感谢: https://github.com/dingqianwen/my-blog // 如果点赞,先判断有没有登录 let $gc = $('#gitalk-container'); $gc.on('click', '.gt-comment-like', function () { diff --git a/repos/.vitepress/theme/components/Footer.vue b/repos/.vitepress/theme/components/Footer.vue index fe9ca93e1..b04154fcc 100644 --- a/repos/.vitepress/theme/components/Footer.vue +++ b/repos/.vitepress/theme/components/Footer.vue @@ -14,7 +14,7 @@ - {{ theme.footerConfig.publicSecurityRecordCode }} + {{ theme.footerConfig.publicSecurityRecordCode }}

diff --git a/repos/.vitepress/theme/components/WordCloud.vue b/repos/.vitepress/theme/components/WordCloud.vue new file mode 100644 index 000000000..7c1bf6ee3 --- /dev/null +++ b/repos/.vitepress/theme/components/WordCloud.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/repos/.vitepress/theme/components/dynamic/Tag.vue b/repos/.vitepress/theme/components/dynamic/Tag.vue index b65cb0375..dce902ae0 100644 --- a/repos/.vitepress/theme/components/dynamic/Tag.vue +++ b/repos/.vitepress/theme/components/dynamic/Tag.vue @@ -10,6 +10,8 @@
+ + @@ -42,7 +44,6 @@
-