From dcacc1feaa8805bfdb6ad896a97748d9df0e5263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 07:50:17 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/introduce.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/introduce.md b/src/introduce.md index d1b13d0..5892c2c 100644 --- a/src/introduce.md +++ b/src/introduce.md @@ -17,6 +17,6 @@ index: false ### 2024.2.12 - 迁移 [VuePress Theme Hope](https://theme-hope.vuejs.press/zh/) 至 V2 -- 关闭打印按钮/Github 相关信息显示 -- 更新主页版权信息 -- 修复导航栏图标不显示 +- 关闭打印按钮以及 Github 相关信息显示 +- 更新首页版权信息 +- 修复浏览器导航栏图标不显示的问题 From e94dc1b9330d36b7ca99669c0d1b30b3e74aeef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 07:50:55 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E9=A1=B6=E6=A0=8F=E5=92=8C=E4=BE=A7?= =?UTF-8?q?=E6=A0=8F=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/navbar.ts | 7 ++++--- src/.vuepress/sidebar.ts | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/.vuepress/navbar.ts b/src/.vuepress/navbar.ts index 28317d4..25df3ae 100644 --- a/src/.vuepress/navbar.ts +++ b/src/.vuepress/navbar.ts @@ -4,10 +4,11 @@ export default navbar([ "/", { text: '高三特刊', + icon: "book", children: [ - { text: "2022级特刊", link: '/2022/' }, - { text: '2021级特刊', link: '/2021/' }, - { text: '2020级特刊', link: '/2020/' }, + { text: "2022 级特刊", link: '/2022/' }, + { text: '2021 级特刊', link: '/2021/' }, + { text: '2020 级特刊', link: '/2020/' }, ] } ]); diff --git a/src/.vuepress/sidebar.ts b/src/.vuepress/sidebar.ts index 03f1b7c..8783202 100644 --- a/src/.vuepress/sidebar.ts +++ b/src/.vuepress/sidebar.ts @@ -8,21 +8,21 @@ export default sidebar({ link: "introduce.md" }, { - text: "2022级特刊", + text: "2022 级特刊", prefix: "2022/", link: "2022/", children: "structure", collapsible: true }, { - text: "2021级特刊", + text: "2021 级特刊", prefix: "2021/", link: "2021/", children: "structure", collapsible: true }, { - text: "2020级特刊", + text: "2020 级特刊", prefix: "2020/", link: "2020/", children: "structure", From fa6ca66985f90c2c947f2a67331979f5048ef354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 07:51:17 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=85=B3=E9=97=AD=20Git=20=E8=B4=A1?= =?UTF-8?q?=E7=8C=AE=E8=80=85=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/theme.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/.vuepress/theme.ts b/src/.vuepress/theme.ts index 343232c..9670eab 100644 --- a/src/.vuepress/theme.ts +++ b/src/.vuepress/theme.ts @@ -29,14 +29,11 @@ export default hopeTheme({ displayFooter: true, - // page meta - metaLocales: { - editLink: "在 Gitee 上查看此页", - }, - plugins: { icon: { assets: "fontawesome" }, - + git: { + contributors: false + } }, markdown: { include: true, From c6ab232e1716eb3f0576d1959aea7585952d9ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 10:02:04 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20$theme-color=20?= =?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/styles/config.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.vuepress/styles/config.scss b/src/.vuepress/styles/config.scss index d55649d..15e3186 100644 --- a/src/.vuepress/styles/config.scss +++ b/src/.vuepress/styles/config.scss @@ -1,2 +1,2 @@ // you can change config here -$theme-color: #096dd9 !default; +$theme-color: #096dd9; From f05c95260bb8eee7c77aa53483c88216b73a3d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 10:04:38 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=B0=83=E6=95=B4=20README.md=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E6=AD=A5=E9=AA=A4=E7=BC=96=E5=8F=B7=E5=92=8C=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ccb5dc..fa5765e 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,29 @@ 1. 依赖环境 - Node.js v20.11.0 - volta -1. 建议使用 [volta](https://volta.sh/) 安装 [Node.js](https://nodejs.org/) + +2. 建议使用 [volta](https://volta.sh/) 安装 [Node.js](https://nodejs.org/) ```sh volta install node@20 ``` -2. 安装依赖 +```sh +volta install pnpm +``` + +3. 安装依赖 ```sh pnpm i ``` -3. 本地预览 +4. 本地预览 ```sh pnpm run docs:dev ``` -4. 构建静态页面。构建完成的网页会保存在 ``src\.vuepress\dist`` +5. 构建静态页面。构建完成的网页会保存在 ``src\.vuepress\dist`` ```sh pnpm run docs:build ``` + +6. 更新依赖 +```sh +pnpm dlx vp-update +``` \ No newline at end of file From ff8ba6bbc7f88a9bde5fff0b5ffe5c8d877c3a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 10:23:27 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BB=85=E6=98=BE=E7=A4=BA=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/theme.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/.vuepress/theme.ts b/src/.vuepress/theme.ts index 9670eab..5db9051 100644 --- a/src/.vuepress/theme.ts +++ b/src/.vuepress/theme.ts @@ -28,6 +28,7 @@ export default hopeTheme({ footer: "高三特刊", displayFooter: true, + pageInfo: ["Category", "Tag"], plugins: { icon: { assets: "fontawesome" }, From 5da984b9dfe7a466d6c83ce5a34e148240223e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 10:23:59 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=A1=B5=E8=84=9A=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=97=A5=E5=BF=97=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.vuepress/theme.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/.vuepress/theme.ts b/src/.vuepress/theme.ts index 5db9051..fbaf956 100644 --- a/src/.vuepress/theme.ts +++ b/src/.vuepress/theme.ts @@ -33,7 +33,11 @@ export default hopeTheme({ plugins: { icon: { assets: "fontawesome" }, git: { - contributors: false + contributors: false, + changelog: { + maxCount: 5, + repoUrl: "https://gitea.lionhao.top/jjnwxs/jingji_spbook", + } } }, markdown: { From 18f99870e3aa04c061a51347077fa597b586d7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B5=A9?= <3116737282@qq.com> Date: Sun, 27 Apr 2025 10:38:07 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=9C=A8=E9=83=A8=E7=BD=B2=E5=90=8E?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=B0=86=E9=A2=84=E8=A7=88=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E5=88=B0=E6=8B=89=E5=8F=96=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 17f2fa6..b3c6fdf 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -42,6 +42,7 @@ jobs: permissions: contents: read deployments: write + pull-requests: write steps: - name: 🚚 Checkout uses: actions/checkout@v4 @@ -66,8 +67,26 @@ jobs: run: pnpm run docs:build - name: 🚀 Deploy to Cloudflare Pages + id: deploy uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook \ No newline at end of file + command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook + + - name: 💬 Comment on PR + if: github.event_name == 'pull_request' + uses: actions/github-script@v7 + with: + script: | + const deployUrl = process.env.DEPLOY_URL; + const commentBody = `🚀 Documentation preview deployed to: [${deployUrl}](${deployUrl})`; + + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody + }); + env: + DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }} \ No newline at end of file