AstroWind 範本
一個生產就緒的 Astro 5.0 + Tailwind CSS 範本,具有完美的 PageSpeed 評分、深色模式、RSS 部落格與 SEO 最佳化。
技術棧
- 框架:Astro 5.0 搭配 MDX 支援
- 樣式:Tailwind CSS
- 語言:TypeScript
- 功能:深色模式、RSS、SEO、部落格
- 套件管理員:npm
- 輸出目錄:
dist - 開發埠號:4321
設定
1. 複製範本
git clone --depth 1 https://github.com/Eng0AI/astrowind-template.git .
如果目錄非空:
git clone --depth 1 https://github.com/Eng0AI/astrowind-template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. 移除 Git 歷史(選擇性)
rm -rf .git
git init
3. 安裝相依套件
npm install
建置
npm run build
部署
Vercel(建議)
vercel pull --yes -t $VERCEL_TOKEN
vercel build --prod -t $VERCEL_TOKEN
vercel deploy --prebuilt --prod --yes -t $VERCEL_TOKEN
Netlify
netlify deploy --prod --dir=dist
開發
npm run dev
設定
編輯 src/config.yaml 以自訂:
- 網站名稱、描述與中繼資料
- 導覽連結
- 社群媒體連結
- 分析設定