開始之前
本教學會把 VitePress 文件站部署到 Cloudflare Pages,並使用正式網域:
text
https://docs.hideapps.top你需要準備
- 一個可以推送程式碼的 Git 倉庫,建議使用 GitHub。
- 一個 Cloudflare 帳號。
- hideapps.top 的 DNS 管理權限。
- 本機 Node.js 環境。建議在 Cloudflare Pages 中使用相同主要版本。
專案結構
text
.
├─ .vitepress/
│ ├─ config.mts
│ └─ theme/
├─ guide/
├─ reference/
├─ public/
├─ package.json
└─ wrangler.toml本機指令
安裝依賴:
bash
npm install啟動開發伺服器:
bash
npm run dev建置靜態站點:
bash
npm run build建置輸出位置:
text
.vitepress/dist下一步:建立並維護 VitePress 專案內容。