From abd80c6b77aaaeb92e4a6de7b4afeb9f15e708bb Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sat, 13 Aug 2022 23:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-pages.yml | 24 +- .gitignore | 1 - README.md | 23 +- collect-article-data.mjs | 4 +- {repos => docs}/.vitepress/config.ts | 0 .../.vitepress/config/constants.ts | 0 {repos => docs}/.vitepress/config/head.ts | 0 {repos => docs}/.vitepress/config/markdown.ts | 1 - {repos => docs}/.vitepress/config/nav.ts | 0 {repos => docs}/.vitepress/config/sidebar.ts | 12 +- {repos => docs}/.vitepress/config/theme.ts | 5 +- {repos => docs}/.vitepress/theme/MyLayout.vue | 5 +- .../theme/components/ArticleMetadata.vue | 0 docs/.vitepress/theme/components/Comment.vue | 49 + .../.vitepress/theme/components/Footer.vue | 0 .../.vitepress/theme/components/WordCloud.vue | 0 .../theme/components/dynamic/Archive.vue | 0 .../theme/components/dynamic/Tag.vue | 0 {repos => docs}/.vitepress/theme/index.ts | 0 .../.vitepress/theme/styles/custom.css | 0 .../.vitepress/theme/styles/gitalk.css | 0 .../.vitepress/theme/styles/vars.css | 0 {repos => docs}/.vitepress/theme/utils.ts | 0 {repos => docs}/about/index.md | 0 {repos => docs}/about/me.md | 1 + {repos => docs}/archives.md | 1 + .../03/25/合并两个Git仓库的历史提交记录.md | 0 .../26/修改Git最后一次提交记录的作者和邮箱.md | 0 .../27/修改Git所有提交记录中的作者和邮箱.md | 0 {repos => docs}/categories/fragments/index.md | 1 + ...回收站已损坏。是否清空该驱动器上的回收站.md | 0 .../12/08/for循环中删除集合元素隐藏的陷阱.md | 0 ...o for Spring Boot default configuration.md | 0 .../issues/2021/12/11/SQL 注入攻击风险.md | 0 .../无法访问F盘。文件或目录损坏且无法读取.md | 0 ...Script 无法存储 Java Long 类型数据问题.md | 0 ...个自身类的静态对象变量,究竟会如何执行?.md | 0 {repos => docs}/categories/issues/index.md | 1 + .../2021/11/18/用Java8获取近N天日期.md | 0 .../2021/11/22/一条SQL查询今年每月统计信息.md | 0 {repos => docs}/categories/solutions/index.md | 1 + .../mybatis/01-MyBatis基础/01-快速入门.md | 0 .../mybatis/01-MyBatis基础/02-核心对象.md | 0 .../mybatis/01-MyBatis基础/03-核心配置文件.md | 0 .../04-SQL映射文件之查询元素.md | 0 .../05-SQL映射文件之增删改元素.md | 0 .../06-SQL映射文件之自定义映射元素.md | 0 .../07-SQL映射文件之缓存元素.md | 0 .../mybatis/01-MyBatis基础/08-动态SQL.md | 0 {repos => docs}/courses/mybatis/index.md | 0 {repos => docs}/index.md | 0 {repos => docs}/public/CNAME | 0 {repos => docs}/public/favicon.ico | Bin .../public/img/2020/12/25/202012252219533.png | Bin .../public/img/2020/12/25/202012252221059.png | Bin .../public/img/2020/12/25/202012252221734.png | Bin .../public/img/2020/12/25/202012252222518.png | Bin .../public/img/2020/12/25/202012252222738.png | Bin .../public/img/2020/12/25/202012252222812.png | Bin .../public/img/2020/12/25/202012252223067.png | Bin .../public/img/2020/12/25/202012252223708.png | Bin .../public/img/2020/12/25/202012252243280.png | Bin .../public/img/2020/12/26/202012262251170.png | Bin .../public/img/2020/12/26/202012262252221.png | Bin .../public/img/2020/12/27/202012271107691.png | Bin .../public/img/2020/12/27/202012271125273.jpg | Bin .../public/img/2020/12/27/202012271125276.png | Bin .../public/img/2020/12/27/202012271126381.png | Bin .../public/img/2020/12/27/202012271127794.png | Bin .../public/img/2020/12/28/202012281130648.jpg | Bin .../public/img/2020/12/28/202012281131280.png | Bin .../public/img/2020/12/28/202012281131380.png | Bin .../public/img/2020/12/28/202012281132193.png | Bin .../public/img/2020/12/28/202012281133167.png | Bin .../public/img/2020/12/28/202012281138752.png | Bin .../public/img/2020/12/28/202012281139250.png | Bin .../public/img/2020/12/28/202012281139256.png | Bin .../public/img/2020/12/28/202012281139540.png | Bin .../public/img/2020/12/29/202012291143905.png | Bin .../public/img/2020/12/29/202012291144689.png | Bin .../public/img/2020/12/29/202012291144692.png | Bin .../public/img/2020/12/29/202012291145084.png | Bin .../public/img/2020/12/29/202012291145312.png | Bin .../public/img/2021/12/01/202112012236800.png | Bin .../img/2021/12/01/202112012236805.jpeg | Bin .../public/img/2021/12/01/202112012236810.png | Bin .../public/img/2021/12/10/202112102211700.jpg | Bin .../public/img/2021/12/10/202112102211705.png | Bin .../public/img/2021/12/10/202112102211710.png | Bin .../public/img/2021/12/13/202112132257200.png | Bin .../public/img/2021/12/13/202112132257205.png | Bin .../public/img/2021/12/13/202112132257210.png | Bin .../public/img/2021/12/13/202112132257215.png | Bin .../public/img/2021/12/13/202112132257220.png | Bin .../public/img/2021/12/13/202112132257225.png | Bin .../public/img/2021/12/13/202112132257230.png | Bin .../public/img/2021/12/13/202112132257235.png | Bin .../public/img/2022/01/26/202201260941889.png | Bin .../public/img/2022/01/26/202201260942561.png | Bin .../public/img/2022/03/25/202203252252923.png | Bin .../public/img/2022/03/25/202203252252926.png | Bin .../public/img/2022/03/25/202203252252929.png | Bin .../public/img/2022/03/25/202203252252931.png | Bin {repos => docs}/public/img/badge/gongan.png | Bin .../public/img/svg/about-footer.svg | 0 .../public/img/svg/about-me-header.svg | 0 .../public/img/svg/about-repos-header.svg | 0 .../public/img/svg/chinese-zodiac/dog.svg | 0 .../public/img/svg/chinese-zodiac/dragon.svg | 0 .../public/img/svg/chinese-zodiac/goat.svg | 0 .../public/img/svg/chinese-zodiac/horse.svg | 0 .../public/img/svg/chinese-zodiac/monkey.svg | 0 .../public/img/svg/chinese-zodiac/ox.svg | 0 .../public/img/svg/chinese-zodiac/pig.svg | 0 .../public/img/svg/chinese-zodiac/rabbit.svg | 0 .../public/img/svg/chinese-zodiac/rat.svg | 0 .../public/img/svg/chinese-zodiac/rooster.svg | 0 .../public/img/svg/chinese-zodiac/snake.svg | 0 .../public/img/svg/chinese-zodiac/tiger.svg | 0 {repos => docs}/public/logo.png | Bin {repos => docs}/public/screenshot/主页.png | Bin .../public/screenshot/我的归档1.png | Bin .../public/screenshot/我的归档2.png | Bin .../public/screenshot/我的标签1.png | Bin .../public/screenshot/我的标签2.png | Bin .../public/screenshot/文章元数据信息.png | Bin docs/public/screenshot/文章评论1.png | Bin 0 -> 108884 bytes docs/public/screenshot/文章评论2.png | Bin 0 -> 109204 bytes {repos => docs}/tags.md | 1 + {repos => docs}/vite.config.js | 0 package.json | 25 +- repos/.vitepress/theme/components/Comment.vue | 79 - repos/public/screenshot/文章评论1.png | Bin 120525 -> 0 bytes repos/public/screenshot/文章评论2.png | Bin 115444 -> 0 bytes yarn.lock | 2128 +++++++++++++++++ 135 files changed, 2234 insertions(+), 128 deletions(-) rename {repos => docs}/.vitepress/config.ts (100%) rename {repos => docs}/.vitepress/config/constants.ts (100%) rename {repos => docs}/.vitepress/config/head.ts (100%) rename {repos => docs}/.vitepress/config/markdown.ts (91%) rename {repos => docs}/.vitepress/config/nav.ts (100%) rename {repos => docs}/.vitepress/config/sidebar.ts (93%) rename {repos => docs}/.vitepress/config/theme.ts (88%) rename {repos => docs}/.vitepress/theme/MyLayout.vue (66%) rename {repos => docs}/.vitepress/theme/components/ArticleMetadata.vue (100%) create mode 100644 docs/.vitepress/theme/components/Comment.vue rename {repos => docs}/.vitepress/theme/components/Footer.vue (100%) rename {repos => docs}/.vitepress/theme/components/WordCloud.vue (100%) rename {repos => docs}/.vitepress/theme/components/dynamic/Archive.vue (100%) rename {repos => docs}/.vitepress/theme/components/dynamic/Tag.vue (100%) rename {repos => docs}/.vitepress/theme/index.ts (100%) rename {repos => docs}/.vitepress/theme/styles/custom.css (100%) rename {repos => docs}/.vitepress/theme/styles/gitalk.css (100%) rename {repos => docs}/.vitepress/theme/styles/vars.css (100%) rename {repos => docs}/.vitepress/theme/utils.ts (100%) rename {repos => docs}/about/index.md (100%) rename {repos => docs}/about/me.md (99%) rename {repos => docs}/archives.md (82%) rename {repos => docs}/categories/fragments/2022/03/25/合并两个Git仓库的历史提交记录.md (100%) rename {repos => docs}/categories/fragments/2022/03/26/修改Git最后一次提交记录的作者和邮箱.md (100%) rename {repos => docs}/categories/fragments/2022/03/27/修改Git所有提交记录中的作者和邮箱.md (100%) rename {repos => docs}/categories/fragments/index.md (94%) rename {repos => docs}/categories/issues/2021/12/01/F盘上的回收站已损坏。是否清空该驱动器上的回收站.md (100%) rename {repos => docs}/categories/issues/2021/12/08/for循环中删除集合元素隐藏的陷阱.md (100%) rename {repos => docs}/categories/issues/2021/12/10/Command line is too long. Shorten command line for XXX or also for Spring Boot default configuration.md (100%) rename {repos => docs}/categories/issues/2021/12/11/SQL 注入攻击风险.md (100%) rename {repos => docs}/categories/issues/2021/12/13/无法访问F盘。文件或目录损坏且无法读取.md (100%) rename {repos => docs}/categories/issues/2022/01/26/JavaScript 无法存储 Java Long 类型数据问题.md (100%) rename {repos => docs}/categories/issues/2022/03/24/创建一个自身类的静态对象变量,究竟会如何执行?.md (100%) rename {repos => docs}/categories/issues/index.md (91%) rename {repos => docs}/categories/solutions/2021/11/18/用Java8获取近N天日期.md (100%) rename {repos => docs}/categories/solutions/2021/11/22/一条SQL查询今年每月统计信息.md (100%) rename {repos => docs}/categories/solutions/index.md (95%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/01-快速入门.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/02-核心对象.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/03-核心配置文件.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/04-SQL映射文件之查询元素.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/05-SQL映射文件之增删改元素.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/06-SQL映射文件之自定义映射元素.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/07-SQL映射文件之缓存元素.md (100%) rename {repos => docs}/courses/mybatis/01-MyBatis基础/08-动态SQL.md (100%) rename {repos => docs}/courses/mybatis/index.md (100%) rename {repos => docs}/index.md (100%) rename {repos => docs}/public/CNAME (100%) rename {repos => docs}/public/favicon.ico (100%) rename {repos => docs}/public/img/2020/12/25/202012252219533.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252221059.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252221734.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252222518.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252222738.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252222812.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252223067.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252223708.png (100%) rename {repos => docs}/public/img/2020/12/25/202012252243280.png (100%) rename {repos => docs}/public/img/2020/12/26/202012262251170.png (100%) rename {repos => docs}/public/img/2020/12/26/202012262252221.png (100%) rename {repos => docs}/public/img/2020/12/27/202012271107691.png (100%) rename {repos => docs}/public/img/2020/12/27/202012271125273.jpg (100%) rename {repos => docs}/public/img/2020/12/27/202012271125276.png (100%) rename {repos => docs}/public/img/2020/12/27/202012271126381.png (100%) rename {repos => docs}/public/img/2020/12/27/202012271127794.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281130648.jpg (100%) rename {repos => docs}/public/img/2020/12/28/202012281131280.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281131380.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281132193.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281133167.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281138752.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281139250.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281139256.png (100%) rename {repos => docs}/public/img/2020/12/28/202012281139540.png (100%) rename {repos => docs}/public/img/2020/12/29/202012291143905.png (100%) rename {repos => docs}/public/img/2020/12/29/202012291144689.png (100%) rename {repos => docs}/public/img/2020/12/29/202012291144692.png (100%) rename {repos => docs}/public/img/2020/12/29/202012291145084.png (100%) rename {repos => docs}/public/img/2020/12/29/202012291145312.png (100%) rename {repos => docs}/public/img/2021/12/01/202112012236800.png (100%) rename {repos => docs}/public/img/2021/12/01/202112012236805.jpeg (100%) rename {repos => docs}/public/img/2021/12/01/202112012236810.png (100%) rename {repos => docs}/public/img/2021/12/10/202112102211700.jpg (100%) rename {repos => docs}/public/img/2021/12/10/202112102211705.png (100%) rename {repos => docs}/public/img/2021/12/10/202112102211710.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257200.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257205.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257210.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257215.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257220.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257225.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257230.png (100%) rename {repos => docs}/public/img/2021/12/13/202112132257235.png (100%) rename {repos => docs}/public/img/2022/01/26/202201260941889.png (100%) rename {repos => docs}/public/img/2022/01/26/202201260942561.png (100%) rename {repos => docs}/public/img/2022/03/25/202203252252923.png (100%) rename {repos => docs}/public/img/2022/03/25/202203252252926.png (100%) rename {repos => docs}/public/img/2022/03/25/202203252252929.png (100%) rename {repos => docs}/public/img/2022/03/25/202203252252931.png (100%) rename {repos => docs}/public/img/badge/gongan.png (100%) rename {repos => docs}/public/img/svg/about-footer.svg (100%) rename {repos => docs}/public/img/svg/about-me-header.svg (100%) rename {repos => docs}/public/img/svg/about-repos-header.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/dog.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/dragon.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/goat.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/horse.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/monkey.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/ox.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/pig.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/rabbit.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/rat.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/rooster.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/snake.svg (100%) rename {repos => docs}/public/img/svg/chinese-zodiac/tiger.svg (100%) rename {repos => docs}/public/logo.png (100%) rename {repos => docs}/public/screenshot/主页.png (100%) rename {repos => docs}/public/screenshot/我的归档1.png (100%) rename {repos => docs}/public/screenshot/我的归档2.png (100%) rename {repos => docs}/public/screenshot/我的标签1.png (100%) rename {repos => docs}/public/screenshot/我的标签2.png (100%) rename {repos => docs}/public/screenshot/文章元数据信息.png (100%) create mode 100644 docs/public/screenshot/文章评论1.png create mode 100644 docs/public/screenshot/文章评论2.png rename {repos => docs}/tags.md (81%) rename {repos => docs}/vite.config.js (100%) delete mode 100644 repos/.vitepress/theme/components/Comment.vue delete mode 100644 repos/public/screenshot/文章评论1.png delete mode 100644 repos/public/screenshot/文章评论2.png create mode 100644 yarn.lock diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 4524c0326..8c81cf5bd 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -17,24 +17,28 @@ jobs: # 任务1: 部署 GitHub Pages deploy-github-pages: runs-on: ubuntu-latest - steps: # 1、检出源码 - name: Checkout uses: actions/checkout@v3 - - # 2、安装模块并打包 - - name: Install and Build - run: | - yarn install - yarn build - - # 3、部署 GitHub Pages + # 2、安装 Node 环境 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn + # 3、安装依赖 + - name: Install dependencies + run: yarn install --frozen-lockfile + # 4、打包 + - name: Build + run: yarn build + # 5、部署 GitHub Pages - name: Deploy GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: BRANCH: pages - FOLDER: repos/.vitepress/dist + FOLDER: docs/.vitepress/dist # 任务2: 部署 Gitee Pages deploy-gitee-pages: diff --git a/.gitignore b/.gitignore index eacd117fd..ab0e1f17a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ coverage/ .vscode # Temp files -yarn.lock package-lock.json .vite_opt_cache diff --git a/README.md b/README.md index 1f25948ef..54e676100 100644 --- a/README.md +++ b/README.md @@ -41,35 +41,35 @@ 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 +- [x] 文章评论:目前仅支持Gitalk ## 部分页面截图 ### 主页美化 -![主页](./repos/public/screenshot/主页.png) +![主页](./docs/public/screenshot/主页.png) ### 文章元数据信息 -![文章元数据信息](./repos/public/screenshot/文章元数据信息.png) +![文章元数据信息](./docs/public/screenshot/文章元数据信息.png) ### 我的标签 -![我的标签](./repos/public/screenshot/我的标签1.png) -![我的标签](./repos/public/screenshot/我的标签2.png) +![我的标签](./docs/public/screenshot/我的标签1.png) +![我的标签](./docs/public/screenshot/我的标签2.png) ### 我的归档 -![我的归档](./repos/public/screenshot/我的归档1.png) -![我的归档](./repos/public/screenshot/我的归档2.png) +![我的归档](./docs/public/screenshot/我的归档1.png) +![我的归档](./docs/public/screenshot/我的归档2.png) -### 文章评论(未完待续) +### 文章评论 -![文章评论](./repos/public/screenshot/文章评论1.png) -![文章评论](./repos/public/screenshot/文章评论2.png) +![文章评论](./docs/public/screenshot/文章评论1.png) +![文章评论](./docs/public/screenshot/文章评论2.png) ## 致谢 @@ -80,6 +80,7 @@ yarn build - [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 配置暗黑主题) +- [Dedicatus546/Dedicatus546.github.io](https://github.com/Dedicatus546/Dedicatus546.github.io) (参考 Gitalk 跨域调用 API 失效的解决方案) - [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) (使用部分图表) diff --git a/collect-article-data.mjs b/collect-article-data.mjs index 0e382eddd..c35c84b25 100644 --- a/collect-article-data.mjs +++ b/collect-article-data.mjs @@ -3,10 +3,10 @@ import matter from 'gray-matter' import fs from 'node:fs/promises' const articleData = await Promise.all( - glob.sync('./repos/**/*.md', { + glob.sync('./docs/**/*.md', { onlyFiles: true, objectMode: true, - ignore: ['./repos/**/index.md', './repos/**/tags.md', './repos/**/archives.md', './repos/**/me.md'], // without ! + ignore: ['./docs/**/index.md', './docs/**/tags.md', './docs/**/archives.md', './docs/**/me.md'], // without ! }).map(async (article) => { const file = matter.read(`${article.path}`) const { data, path } = file diff --git a/repos/.vitepress/config.ts b/docs/.vitepress/config.ts similarity index 100% rename from repos/.vitepress/config.ts rename to docs/.vitepress/config.ts diff --git a/repos/.vitepress/config/constants.ts b/docs/.vitepress/config/constants.ts similarity index 100% rename from repos/.vitepress/config/constants.ts rename to docs/.vitepress/config/constants.ts diff --git a/repos/.vitepress/config/head.ts b/docs/.vitepress/config/head.ts similarity index 100% rename from repos/.vitepress/config/head.ts rename to docs/.vitepress/config/head.ts diff --git a/repos/.vitepress/config/markdown.ts b/docs/.vitepress/config/markdown.ts similarity index 91% rename from repos/.vitepress/config/markdown.ts rename to docs/.vitepress/config/markdown.ts index edeef12c7..6e42ae941 100644 --- a/repos/.vitepress/config/markdown.ts +++ b/docs/.vitepress/config/markdown.ts @@ -5,7 +5,6 @@ export const markdown: MarkdownOptions = { lineNumbers: true, // 启用行号 // 在所有文档的

标签后添加组件 - // 感谢: https://github.com/vuejs/vitepress/issues/1050 config: (md) => { md.renderer.rules.heading_close = (tokens, idx, options, env, slf) => { let htmlResult = slf.renderToken(tokens, idx, options, env, slf) diff --git a/repos/.vitepress/config/nav.ts b/docs/.vitepress/config/nav.ts similarity index 100% rename from repos/.vitepress/config/nav.ts rename to docs/.vitepress/config/nav.ts diff --git a/repos/.vitepress/config/sidebar.ts b/docs/.vitepress/config/sidebar.ts similarity index 93% rename from repos/.vitepress/config/sidebar.ts rename to docs/.vitepress/config/sidebar.ts index 35bda7dc5..1ee603984 100644 --- a/repos/.vitepress/config/sidebar.ts +++ b/docs/.vitepress/config/sidebar.ts @@ -23,25 +23,25 @@ function getItemsByDate (path: string) { let items: DefaultTheme.SidebarItem[] = [] // 1.获取所有年份目录 - sync(`repos/${path}/*`, { + sync(`docs/${path}/*`, { onlyDirectories: true, objectMode: true }).forEach(({ name }) => { let year = name // 2.获取所有月份目录 - sync(`repos/${path}/${year}/*`, { + sync(`docs/${path}/${year}/*`, { onlyDirectories: true, objectMode: true }).forEach(({ name }) => { let month = name // 3.获取所有日期目录 - sync(`repos/${path}/${year}/${month}/*`, { + sync(`docs/${path}/${year}/${month}/*`, { onlyDirectories: true, objectMode: true }).forEach(({ name }) => { let day = name // 4.获取日期目录下的所有文章 - sync(`repos/${path}/${year}/${month}/${day}/*`, { + sync(`docs/${path}/${year}/${month}/${day}/*`, { onlyFiles: true, objectMode: true }).forEach(({ name }) => { @@ -93,13 +93,13 @@ function getItems (path: string) { let items: DefaultTheme.SidebarItem[] = [] // 1.获取所有分组目录 - sync(`repos/${path}/*`, { + sync(`docs/${path}/*`, { onlyDirectories: true, objectMode: true }).forEach(({ name }) => { let groupName = name // 2.获取分组下的所有文章 - sync(`repos/${path}/${groupName}/*`, { + sync(`docs/${path}/${groupName}/*`, { onlyFiles: true, objectMode: true }).forEach(({ name }) => { diff --git a/repos/.vitepress/config/theme.ts b/docs/.vitepress/config/theme.ts similarity index 88% rename from repos/.vitepress/config/theme.ts rename to docs/.vitepress/config/theme.ts index f93ae6432..355687446 100644 --- a/repos/.vitepress/config/theme.ts +++ b/docs/.vitepress/config/theme.ts @@ -48,16 +48,15 @@ export const themeConfig: DefaultTheme.Config = { type: 'gitalk', options: { clientID: '1de126ce1fbdbe049709', - clientSecret: '97e359a006ba7b0d8e9d9bf38b83de59eb69ecba', + clientSecret: '035fe49874a43e5cefc28a99b7e40b1925319c62', repo: 'charles7c.github.io-comments', owner: 'Charles7c', admin: ['Charles7c'], language: 'zh-CN', distractionFreeMode: false, // 默认: https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token - // 感谢: https://prohibitorum.top/2022/07/26/%E8%A7%A3%E5%86%B3-Gitalk-%E6%97%A0%E6%B3%95%E8%8E%B7%E5%8F%96-Github-Token-%E9%97%AE%E9%A2%98/ proxy: 'https://cors-server-ecru.vercel.app/github_access_token' }, - hideComments: true // 全局隐藏评论,默认 false + showComment: true // 是否显示评论 } } \ No newline at end of file diff --git a/repos/.vitepress/theme/MyLayout.vue b/docs/.vitepress/theme/MyLayout.vue similarity index 66% rename from repos/.vitepress/theme/MyLayout.vue rename to docs/.vitepress/theme/MyLayout.vue index 875e75c6b..46271b7db 100644 --- a/repos/.vitepress/theme/MyLayout.vue +++ b/docs/.vitepress/theme/MyLayout.vue @@ -1,7 +1,7 @@