项目使用 vuepress,其可专注于文档构建
npm install -g pnpm@next-7pnpm installpnpm dev:vitepnpm build:vitepnpm i -D vuepress@next该采用vuepress-next搭建,内置md,可以采用vue语法,vue 作者出品,UI 主题是 vuepress-theme-hope
- https://luoyunchong.github.io/igeekfan-docs/
- https://igeekfan.gitee.io/igeekfan-docs/
- https://igeekfan.cn
package.json 有这些命令
"scripts": {
"build:vite": "vuepress-vite build docs",
"dev:vite": "vuepress-vite dev docs",
},所以我们可以 pnpm dev:vite 或 pnpm build:vite
pnpm deploy或
.\deploy.ps1nginx 相关配置,/etc/nginx/conf.d/新建一个以.conf 为后缀的文件即可。
cd /etc/nginx/conf.d/
touch igeekfan-docs.confserver {
listen 80;
server_name www.igeekfan.cn;
root /var/www/html/igeekfan-docs;
charset utf-8;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
}
# 判断配置是否有效
nginx -t
# 加载配置项
nginx -s reload