Skip to content

開始之前

本教學會把 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 專案內容。

使用 VitePress 與 Cloudflare Pages 建置。