Commit 8e043b3
committed
ci: 文档站切到自定义域名 stackprism.wenzi.games
之前为了适配 setube.github.io/stackprism/ 这个子路径,vitepress config 加了 base: '/stackprism/'。现在用户在 GitHub Pages 上配了自定义域名 stackprism.wenzi.games,根路径变成了 /,再保留 base 会让所有 asset href 写成 /stackprism/assets/...,部署后全部 404,文档站再次没样式。
config.ts 删掉 base 字段,让它回到 vitepress 默认的 '/'。验证 dist/index.html 第一行 href="/assets/style.D6WGoj68.css",跟自定义域名根目录对齐。
新建 docs/public/CNAME 写入 stackprism.wenzi.games。VitePress 会把 docs/public/ 整体复制到 dist 根,所以每次部署 dist/CNAME 都存在,GitHub Pages 看到 CNAME 文件就维持自定义域名绑定。这样跑 deploy-docs workflow 重新部署也不会丢域名设置。
插件版本升级到 1.0.96。1 parent 0c7d144 commit 8e043b3
3 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments