Skip to content

Commit 672da45

Browse files
committed
feat: add sitemap plugin
1 parent adf64ef commit 672da45

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
/text/.obsidian
66
node_modules
77
*.bkp
8+
*.log
9+

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ paid for this book.**
3939

4040
## 编译
4141

42-
本书采用 [gitbook](https://www.gitbook.com/) 进行编译,如果你想在本地编译,需要安装 gitbook-cli
42+
本书采用 [vuepress](https://vuepress.vuejs.org/) 进行编译,如果你想在本地编译,可以执行如下命令
4343

4444
```
45-
npm install gitbook-cli -g
45+
npm run build
4646
```
4747

48-
然后在项目目录中运行`gitbook serve`即可编译生成html,并且创建一个本地预览网站,其他详细的编译参数可以参照[官方文档](https://toolchain.gitbook.com/setup.html)
48+

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"markdown-it-disable-url-encode": "^1.0.1",
1717
"vuepress": "^1.9.10",
1818
"vuepress-plugin-autometa": "^0.1.13",
19+
"vuepress-plugin-go-top": "^1.0.4",
1920
"vuepress-plugin-sitemap": "^2.3.1"
2021
}
2122
}

text/.vuepress/config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ module.exports = {
3939
},
4040
canonical_base: baseUrl,
4141
},
42-
// 'sitemap': {
43-
// hostname: baseUrl,
44-
// // 排除无实际内容的页面
45-
// exclude: ["/404.html"]
46-
// }
42+
'sitemap': {
43+
hostname: baseUrl,
44+
// 排除无实际内容的页面
45+
exclude: ["/404.html"]
46+
}
4747
}
4848

4949
}

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -8505,6 +8505,11 @@ vuepress-plugin-container@^2.0.2:
85058505
"@vuepress/shared-utils" "^1.2.0"
85068506
markdown-it-container "^2.0.0"
85078507

8508+
vuepress-plugin-go-top@^1.0.4:
8509+
version "1.0.4"
8510+
resolved "https://registry.npmmirror.com/vuepress-plugin-go-top/-/vuepress-plugin-go-top-1.0.4.tgz#b2c359d85280e8737c65a43fde6e6d42953878af"
8511+
integrity sha512-VxYrZmvC9agXVOEzy1G7mJj23p17O7CVmcXhlaFtQ+J827OcIqNC1X646/gOI8Hfn8or17+J+8/Bg0ZSRyizEA==
8512+
85088513
vuepress-plugin-sitemap@^2.3.1:
85098514
version "2.3.1"
85108515
resolved "https://registry.npmmirror.com/vuepress-plugin-sitemap/-/vuepress-plugin-sitemap-2.3.1.tgz#51298aca77a5de96396fdbd1103e1637dd61ae6a"

0 commit comments

Comments
 (0)