Skip to content

杨星的个人博客

这是一个基于 VitePress 的个人博客。

  • 线上地址:https://yangstar.dev
  • 托管平台:Cloudflare Pages
  • 生产分支:main
  • 构建命令:npm run build
  • 构建输出:.vitepress/dist

源码仓库已设为私有,公开访问只使用 https://yangstar.dev

本地开发

bash
npm ci
npm run dev

本地预览默认运行在:

text
http://localhost:5173

构建检查:

bash
npm run build

目录结构

text
.
├── .github/workflows/
│   └── cloudflare-pages.yml   # Cloudflare Pages 部署 workflow
├── .vitepress/
│   ├── config.ts              # VitePress 站点配置
│   └── theme/                 # 自定义主题、组件和样式
├── posts/                     # 博客文章
├── public/
│   └── images/                # 公开图片资源
├── index.md                   # 首页
├── tags.md                    # 标签页
├── archives.md                # 归档页
├── about.md                   # 关于页
└── package.json

发布流程

main 分支推送后,GitHub Actions 会构建 VitePress,并通过 Wrangler 部署到 Cloudflare Pages。

本地脚本只需要负责 git addgit commitgit push;不需要在本机执行部署命令。

最后更新: