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 来定制:
- 站点名称、描述和元数据
- 导航链接
- 社交媒体链接
- 分析设置