# AX. VuePress快速入门
# 1. 准备好相关Markdown文档,生成网站静态文件
yarn docs:build
1
在docs文件夹下将生成dist目录,其中包含网站文件。拷贝获上传该文件夹dist到服务器合适目录。在这里假设为:
/home/cai/vuepress-starter/docs/.vuepress/dist
1
# 2. 修改nginx配置文件
配置文件目录为/usr/local/nginx/conf/nginx.conf,在合适的地方加入如下代码:
server{
listen 8012;
root /home/cai/vuepress-starter/docs/.vuepress/dist;
location / {
index index.html index.htm;
}
1
2
3
4
5
6
2
3
4
5
6
代表让nginx添加一个监听端口8012,并且网站的根目录为/home/cai/vuepress-starter/docs/.vuepress/dist,默认访问文件为index.html。
验证nginx配置文件:
nginx -t
1
最后重启新加载nginx配置文件:
nginx -s reload
1
# 3. 远程访问
✈️ http://202.117.3.66:8012 (opens new window)
🚀 http://astd.xjtu.edu.cn:8012 (opens new window)
# 4. 读取PDF及其他类型文件文件
This is a PPT file (Don't click me! A little slow~):-
2024-1-19 💯