使用 VitePress 搭建的博客。
# 1.设置pnpm国内源
pnpm config set registry https://registry.npmmirror.com
# 2.安装依赖
pnpm install
# 3.dev运行,访问: http://localhost:5173/blogs/
pnpm run docs:dev
# 4.打包,文件存放位置:docs/.vitepress/dist
# 4.1 如果是部署到 GitHub Pages,可以利用 GitHub Actions,在 push 到 GitHub 后自动部署打包
# 4.2 详情见:.github/workflows/deploy-pages.yml,根据个人需要删减工作流配置
pnpm build
# 5.部署
# 5.1 push 到 GitHub 仓库,部署到 GitHub Pages:需要在仓库设置中启用 GitHub Pages(本仓库采用此种部署方式)
# 5.2 在其他平台部署, 例如:Gitee Pages、Vercel、Netlify、个人虚拟主机、个人服务器等