Your Cart
Loading

Formharbor Astro Starter: Astro + Cloudflare Pages Blog Starter with Contact Form

On Sale
$39.00
$39.00
Added to cart

Launch a fast blog or small-business site on your own free Cloudflare account, with a contact form that doesn't need a form service.

Most Astro starters stop at the static pages. The moment you want a contact form, you're signing up for a form service or wiring Turnstile, a serverless function and a database yourself. This kit does that part for you, and the blog, SEO and deployment setup around it.


Every page is static HTML with no client JavaScript. The only script is on the contact page, where Cloudflare Turnstile needs it.


What's included


Site and blog

  • Astro 7 static site, no adapter needed, ready for Cloudflare Pages
  • Blog using content collections: Markdown posts with typed frontmatter (a typo stops the build instead of shipping), tags, drafts (visible in dev, excluded from production, RSS and sitemap), pagination and reading time
  • RSS feed, XML sitemap (drafts, 404 and thank-you page excluded) and a generated robots.txt
  • SEO head: title, description, canonical URL, Open Graph and Twitter/X card tags, JSON-LD for posts
  • Social images generated at build time: one 1200×630 PNG per post plus a site default (satori + sharp, nothing runs at request time)
  • Light/dark theme that follows the visitor's system setting, with no JavaScript. Colours meet WCAG AA contrast in both modes, with a skip link, visible focus styles and semantic markup.
  • Custom 404 page and a thank-you page



Contact form (Cloudflare Pages Function)

  • Form that works without JavaScript (plain POST + redirect) and is enhanced with inline errors when JavaScript is on
  • Turnstile verified on the server (Siteverify), with optional hostname pinning
  • Honeypot field, server-side validation, same-origin check, body size and content-type limits
  • Deliver messages to D1 (migration included), email via Resend, and/or a Discord or Slack webhook. Use one or combine them: the visitor sees success if at least one target works, and failures are logged.
  • Notes on email forwarding, Cloudflare Email Routing, rate limiting and data retention



Deployment and quality

  • wrangler.toml for Pages + D1, .dev.vars.example and .env.example
  • public/_headers with a strict Content-Security-Policy, HSTS, nosniff, frame and referrer policies, and long caching for hashed assets
  • 38 automated tests for the contact handler (Node's built-in test runner, mocked fetch and D1, no network needed)
  • npm run check (type-checks Astro files and the function) and npm run check:dist (checks internal links, sitemap, RSS, robots.txt and SEO tags after a build)
  • README covering setup, local development, deployment through the Cloudflare dashboard (Git) or Wrangler, environment variables and customization, plus guides for the contact form, customizing and troubleshooting



How it was tested: before release, npm install, npm test, npm run build, npm run check and npm run check:dist were run from a clean unzip. The contact form was also run end to end in Wrangler's local Cloudflare runtime with Turnstile's official test keys and a local D1 database, submitted from a headless browser.


Requirements

  • Node.js 22.23.4 or newer (Node 24 LTS recommended) and npm
  • A free Cloudflare account to deploy (Pages, Turnstile and D1 are available on the free plan)
  • Basic comfort with a terminal and editing files. You don't need to know Astro already, but it helps.
  • Optional: a free Resend account and your own domain if you want messages by email



Not included: a hosted service, a CMS or admin dashboard, newsletter or e-commerce features, or setup done for you. Cloudflare's and Resend's free-plan limits are set by them and can change.


Licence (summary): use it for unlimited personal and commercial projects, for yourself or your clients, with no attribution required. You may sell the websites you build with it. You may not resell, share or publish the kit itself (or a lightly modified copy) as a template, theme or starter. Full text is in LICENSE.txt.


Updates and support: v1.0.0 (December 2026). Questions? Reply to your receipt email.


Astro and Cloudflare are trademarks of their owners. This is an independent product, not affiliated with or endorsed by Astro or Cloudflare.


You will get a ZIP (164KB) file