Skip to content

Commit

Permalink
refactor: 将 VitePress 配置文件目录移至仓库根目录
Browse files Browse the repository at this point in the history
  • Loading branch information
Zh40Le1ZOOB committed Feb 7, 2024
1 parent 55a7573 commit 9380c8c
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "src/.vitepress/dist/"
path: ".vitepress/dist/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
book
src/.vitepress/cache
src/.vitepress/dist
.vitepress/cache
.vitepress/dist
node_modules
1 change: 1 addition & 0 deletions src/.vitepress/config.mts → .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default defineConfig({
],
lang: "zh-CN",
cleanUrls: true,
srcDir: "./src",
srcExclude: ["**/SUMMARY.md"],
lastUpdated: true,
sitemap: {
Expand Down
File renamed without changes.
File renamed without changes.
199 changes: 132 additions & 67 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"vitepress-sidebar": "^1.18.6"
},
"scripts": {
"docs:dev": "vitepress dev src",
"docs:build": "vitepress build src",
"docs:preview": "vitepress preview src",
"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/"
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview",
"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 .vitepress/dist/ && cp book/typst-pdf/*.pdf .vitepress/dist/"
}
}

0 comments on commit 9380c8c

Please sign in to comment.