营销页、博客与 Starlight 文档共用一套 Astro 项目,文档自带全文搜索
astro-cloudflare-starter — Astro 博客模板
作者 milzamsz
基于 Astro 的静态营销、博客与文档站点启动器,面向 Cloudflare Pages 部署,内容以 Markdown 管理,无 CMS 与数据库。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
内容以 Markdown/JSON 存于 src/content,通过内容集合 schema 做类型校验
英文优先,内置基于前缀路由的多语言机制,可扩展其他语言
预置 canonical、hreflang、JSON-LD、Open Graph、sitemap、RSS 与动态 llms.txt
浅色/深色主题,单色 OKLCH 设计系统
可选 Cloudflare R2 媒体存储与密钥保护的清理 worker
模板详细介绍
这是一个用 Astro 构建的静态站点模板,定位为营销页、博客与文档三合一。营销页面与博客内容以 Markdown 存放在 src/content 下,并通过内容集合 schema 做类型校验;文档部分由 Starlight 提供,带全文搜索。站点默认英文,内置基于前缀路由的多语言机制,可扩展其他语言。
主题提供浅色/深色切换与单色 OKLCH 设计系统,并预置 SEO 相关输出:canonical、hreflang、JSON-LD、Open Graph、sitemap、RSS 以及动态生成的 llms.txt。构建产物为静态文件,可部署到 Cloudflare Pages;模板另含可选的 Cloudflare R2 媒体存储绑定和一个由密钥保护的清理 worker。
模板不包含 CMS 或数据库,内容更新依赖 Git 提交与合并。仓库以 MIT 许可发布,演示图片、字体、图标等第三方素材需单独核对许可;R2、域名等外部服务可能产生费用。
适合你的项目吗?
适用场景
- 为产品搭建包含营销页、博客和文档的静态站点
- 在 Cloudflare Pages 上托管无需数据库的内容站点
- 需要多语言前缀路由与 SEO 元数据默认配置的项目
- 希望用 Git 与 Markdown 管理内容、不引入 CMS 的团队
适合人群
- 接受以 Git 工作流维护内容的开发者或小团队
- 计划部署到 Cloudflare Pages 的静态站点项目
- 需要营销页、博客、文档三种内容形态并存的站点
- 希望以 MIT 许可代码为基础自行修改的开发者
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后运行 pnpm install 与 pnpm dev,本地默认地址为 http://localhost:4321
- 2
使用前需修改 src/config/site.config.ts 中的 url、name、description、author、email、社交链接与 OG 图片
- 3
按需更新 src/config/nav.config.ts、astro.config.ts 中的 Starlight editLink 与 GitHub 链接,以及 wrangler.jsonc 中的项目名和 R2 桶名
- 4
复制 .env.example 为 .env 并设置 SITE_URL;仅在使用 R2 清理 worker 时配置 CLEANUP_SECRET 为 Cloudflare 密钥
- 5
部署到 Cloudflare Pages 时构建命令为 pnpm build,输出目录为 dist;也可用 npx wrangler pages deploy dist 手动部署
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- R2 媒体存储与清理 worker 为可选功能;启用需在 Cloudflare 配置 R2 存储桶并将 CLEANUP_SECRET 设为 Cloudflare 密钥,可能产生 Cloudflare 服务费用。
- 仅在使用 R2 清理 worker 时才需配置 CLEANUP_SECRET 环境变量;不使用该可选功能则无需设置。
- 部署依赖 Cloudflare Pages 外部服务,需将仓库连接至 Cloudflare Pages 账户;使用该托管服务可能产生费用。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Optional Cloudflare R2 media storage + a secret-guarded cleanup worker
README 原文
Set `CLEANUP_SECRET` as a Cloudflare secret only if you use the R2 cleanup worker.
README 原文
https://github.com/milzamsz/astro-cloudflare-starter/blob/main/LICENSEhttps://github.com/milzamsz/astro-cloudflare-starter/blob/main/README.mdConnect the repo to Cloudflare Pages (build command `pnpm build`, output `dist`)
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Astro Themes
- 资料与维护参考分
- 资料较完整 · 92 / 100
- 技术栈
- Astro
- 网站类型
- 博客 · 文档 · 企业官网 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-14
- 截图检查日期
- 2026-10-02
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 2cb270776805edc576d3b54eb174b913626e76bda5370dbbbf952de218c0b51f
2026-10-02T21:37:03.979Z
来源文件 / 仓库# Astro Cloudflare Starter A production-ready marketing + blog + docs site built with **Astro 7** and **Cloudflare Pages**. English-first and multilanguage-ready. Content is managed with Git and Markdown — no CMS, no database. ## Features - English-first with a multilanguage-ready i18n engine (prefix-based routing) - Marketing pages, blog, and Starlight-powered docs with full-text search - Light/dark theming with a monochrome OKLCH design system - SEO defaults: canonical, hreflang, JSON-LD, Open Graph, sitemap, RSS, dynamic `llms.txt` - Optional Cloudflare R2 media storage + a secret-guarded cleanup worker - Static output — fast on the Cloudflare CDN, cheap to host ## Quick Start ```bash git clone https://github.com/milzamsz/astro-cloudflare-starter.git cd astro-cloudflare pnpm install pnpm dev ``` Open **http://localhost:4321**. ## Make it yours After clicking **Use this template**, update these: - [ ] `src/config/site.config.ts` — `url`, `name`, `description`, `author`, `email`, social links, OG image. Single source of truth (canonical/OG/sitemap/`llms.txt`; `astro.config.ts` reads `url`). - [ ] `src/config/nav.config.ts` — footer GitHub/social URLs. - [ ] `astro.config.ts` — Starlight `editLink.baseUrl` and the GitHub social link. - [ ] `wrangler.jsonc` — project `name` and the R2 bucket name (or remove the R2 binding if unused). - [ ] `public/favicon.svg`, logos, and the default OG image. - [ ] `.env.example` → `.env`; set `SITE_URL`. Set `CLEANUP_SECRET` as a Cloudflare secret only if you use the R2 cleanup worker. - [ ] Content in `src/content/` (blog, services, pages, docs, settings). - [ ] `LICENSE` copyright holder and `CHANGELOG.md`. > Tip: update `src/config/site.config.ts` (name, author, email, social links, URL) to make this template yours. ## Documentation | Document | Purpose | |----------|---------| | [SETUP.md](SETUP.md) | Setup and Cloudflare Pages deployment | | [CONTRIBUTING.md](CONTRIBUTING.md) | Development workflow and conventions | | [SECURITY.md](SECURITY.md) | Reporting vulnerabilities | | [CHANGELOG.md](CHANGELOG.md) | Release notes | | `/docs` (Starlight) | In-app guides: getting started, content, i18n, deployment | ## Scripts ```bash pnpm dev # start dev server pnpm build # production build to dist/ pnpm preview # preview the production build pnpm lint # eslint + stylelint + type-check + validations pnpm test # unit tests (vitest) pnpm test:e2e # end-to-end tests (playwright) ``` ## Content model All content lives in `src/content` as Markdown/JSON and is type-checked via content collection schemas. Each entry uses `<slug>.md` with a `locale` frontmatter field (English by default). To add a language, see `docs/guides/internationalization`. Edit files and open a pull request — Cloudflare Pages rebuilds on merge. ## Deployment Connect the repo to Cloudflare Pages (build command `pnpm build`, output `dist`), or deploy manually with `npx wrangler pages deploy dist`. See [SETUP.md](SETUP.md). ## License [MIT](LICENSE)
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客

astro-paper
A minimal, accessible and SEO-friendly Astro blog theme.
Astro · 博客

fuwari
✨A static blog template built with Astro.
Astro · 博客

Firefly
Firefly 是一款基于 Astro 的静态博客主题,由 CuteLeaf 在 saicaca 的 Fuwari 模板基础上二次开发,主打清新美观的视觉风格。
Astro · 博客

astro-theme-cactus
A simple Astro theme. Use it to create your blog or website.
Astro · 作品集

astrofy
Astrofy is a free and open-source template for your Personal Portfolio Website built with Astro and TailwindCS…
Astro · 作品集
