部署
约 173 字小于 1 分钟
2024-12-14
构建项目
- 设置正确的 base 选项。
.vuepress/config.ts
export default defineUserConfig({
host: '0.0.0.0',
port: 8080,
base: '/',
lang: 'zh-CN',
title: 'My Vuepress Site',
})
- 构建生产环境
npm run docs:build
部署项目
本地部署
打开
控制面板
->程序和功能
->启用或关闭Windows功能
勾选 Internet Information Services 和 Internet Information Services 可承载的Web核心
重启电脑后打开
Internet Information Services (IIS)管理器
提示
提示容器
结束
GitHub Pages
创建gihub仓库
将代码推送到仓库
.vuepress/dist/git init git add . git commit -m "first commit" git push -f <仓库链接> main
结束