improve/modified-config #6
@ -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
|
||||
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 }}
|
18
README.md
18
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
|
||||
```
|
@ -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/' },
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
@ -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",
|
||||
|
@ -1,2 +1,2 @@
|
||||
// you can change config here
|
||||
$theme-color: #096dd9 !default;
|
||||
$theme-color: #096dd9;
|
||||
|
@ -28,15 +28,17 @@ export default hopeTheme({
|
||||
footer: "高三特刊",
|
||||
|
||||
displayFooter: true,
|
||||
|
||||
// page meta
|
||||
metaLocales: {
|
||||
editLink: "在 Gitee 上查看此页",
|
||||
},
|
||||
pageInfo: ["Category", "Tag"],
|
||||
|
||||
plugins: {
|
||||
icon: { assets: "fontawesome" },
|
||||
|
||||
git: {
|
||||
contributors: false,
|
||||
changelog: {
|
||||
maxCount: 5,
|
||||
repoUrl: "https://gitea.lionhao.top/jjnwxs/jingji_spbook",
|
||||
}
|
||||
}
|
||||
},
|
||||
markdown: {
|
||||
include: true,
|
||||
|
@ -17,6 +17,6 @@ index: false
|
||||
### 2024.2.12
|
||||
|
||||
- 迁移 [VuePress Theme Hope](https://theme-hope.vuejs.press/zh/) 至 V2
|
||||
- 关闭打印按钮/Github 相关信息显示
|
||||
- 更新主页版权信息
|
||||
- 修复导航栏图标不显示
|
||||
- 关闭打印按钮以及 Github 相关信息显示
|
||||
- 更新首页版权信息
|
||||
- 修复浏览器导航栏图标不显示的问题
|
||||
|
Loading…
x
Reference in New Issue
Block a user