
Template details
AstroWebTheme Free
A free, fast Astro 7 theme for content sites with a blog, tags, categories, search, RSS, dark mode, contact form, and strict security headers.
About this template
AstroWebTheme Free is a free, MIT-licensed Astro 7 theme for blog and content sites, built as static pages and served by a Cloudflare Worker. You change a few config files and write posts in Markdown; the theme handles pagination, tag and category archives, search, feeds, light and dark mode, and strict security headers.
What is AstroWebTheme Free?
AstroWebTheme Free is a static site theme for Astro 7 that builds a blog and content site from Markdown and MDX files. It produces prerendered static pages plus a _headers file with a strict Content-Security-Policy, deployed to a Cloudflare Worker with static assets. The theme is config-driven: site name, colours, pages and features live in src/config/, and small generator scripts rebuild assets and config from those files.
Key Features
- Framework: Astro 7 with MDX and TypeScript, built with Lightning CSS through
@astrojs/cloudflarefor Cloudflare Workers. No UI framework and no Tailwind. - Blog: pagination, tag and category archives, search, RSS feed,
sitemap.xml,robots.txtandllms.txt. - Theme modes: light and dark theme, text logo, responsive layout and accessible markup.
- Contact form: optional, off by default; when enabled it posts to
/api/contact/, a Worker route that forwards messages to a handler you choose. - Security: strict Content-Security-Policy and other security headers generated as a
public/_headersfile. - Cookie bar: a simple Accept and Decline bar that appears only when a tracking script is turned on.
- Optional integrations: Google Analytics, Tag Manager, Cloudflare Analytics and AdSense, all behind consent.
- Included pages: example home, About, Privacy, Cookie and Terms pages, three example posts and a shared image.
How does AstroWebTheme Free work?
- Clone the repository, install with pnpm, and run
pnpm devto open the site athttp://localhost:4321. - Edit config in
src/config/(brand, colours, pages, security, analytics) and run the matchingpnpmgenerator script. - Replace example content in
src/content/blog/andsrc/pages/, then runpnpm buildand deploy withwrangler deploy.
The theme needs Node.js 22.12 or newer and pnpm 11. A placeholder brand, three example posts and one shared image ship with the template; searching a file for EDIT finds the values to change.
Who is it for?
- Bloggers and writers: publish Markdown posts with tags, categories, search and RSS without a CMS.
- Small content-site owners: launch About, Privacy, Cookie and Terms pages from editable config and Astro pages.
- Developers deploying to Cloudflare: ship prerendered static pages on Workers with only
/api/contact/running code; no D1, KV or R2 resources are used. - Editors or contractors: write posts through GitHub pull requests to a repository, with nothing reaching
mainuntil merged.
Use cases
- Personal blogs: publish Markdown/MDX posts with tag and category archives plus search and RSS.
- Content sites: use the included home, About and legal page templates as a starting point and swap in your own text.
- Static deployments: host prerendered pages on Cloudflare Workers with strict security headers generated at build time.
Pricing
AstroWebTheme Free is available under the MIT License at no cost. A separate paid edition exists but is not part of this repository.















