Skip to content

Commit

Permalink
feat: 添加关于页面
Browse files Browse the repository at this point in the history
  • Loading branch information
Zh40Le1ZOOB committed Jan 24, 2024
1 parent bf1fcfc commit eea8868
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ jobs:
unzip times_sans_serif.zip -d ~/.local/share/fonts/times_sans_serif
fc-cache -rv
- name: Build
run: npm run build
run: |
sed -e "s/BUILD_TIME/$(TZ=Asia/Shanghai date -Isecond)/" -e "s/COMMIT_SHA/${{ github.sha }}/" -i src/about.md
npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"docs:dev": "vitepress dev src",
"docs:build": "vitepress build src",
"docs:preview": "vitepress preview src",
"build": "npm run docs:build && mdbook build && cp book/epub/*.epub src/.vitepress/dist/ && cp book/typst-pdf/*.pdf src/.vitepress/dist/"
"build": "npm run docs:build && find src/ -type f -name \"*.md\" ! -path \"src/index.md\" -exec sed -i \"/^---$/,/^---$/d\" {} \\; && mdbook build && cp book/epub/*.epub src/.vitepress/dist/ && cp book/typst-pdf/*.pdf src/.vitepress/dist/"
}
}
7 changes: 6 additions & 1 deletion src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ export default defineConfig({
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: "/progynova.png",
nav: [
{ text: "正文", link: "/01/" },
{ text: "关于", link: "/about" },
],
sidebar: generateSidebar({
documentRootPath: "/src",
useTitleFromFileHeading: true,
useFolderTitleFromIndexFile: true,
useFolderLinkFromIndexFile: true,
collapsed: true,
excludeFiles: ["SUMMARY.md"],
excludeFiles: ["about.md", "SUMMARY.md"],
}),
outline: false,
socialLinks: [{ icon: "github", link: "https://github.com/proskynova" }],
footer: {
message: "基于 CC BY-NC-SA 4.0 许可发布",
Expand Down
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 目录

- [关于](about.md)
- [第一卷 · 朦胧的世界](01/index.md)
- [1 · 出走](01/001.md)
- [2 · 小城市](01/002.md)
Expand Down
25 changes: 25 additions & 0 deletions src/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar: false
prev: false
next: false
---

# 关于

## 版权信息

原作者:[乱世银娘](https://www.weibo.com/p/1005055513855401)

许可证:[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh-hans)

## 项目信息

地址:<https://github.com/proskynova>

维护者:[Zh40Le1ZOOB](https://github.com/Zh40Le1ZOOB)

## 版本信息

构建时间:`BUILD_TIME`

提交 SHA:`COMMIT_SHA`

0 comments on commit eea8868

Please sign in to comment.