How I Built This Blog
I wanted a simple markdown blog that’s fast, free to host, and doesn’t expose my identity. Here’s how I set it up.
This is my first project deployed to Cloudflare. I haven’t used TypeScript/JavaScript much, and never used Astro before. So this blog is also an opportunity to learn more about these technologies.
Stack
- Astro - static site generator with built-in markdown support
- Tailwind CSS - utility-first styling
- Cloudflare Pages - free hosting with unlimited bandwidth
Setup
Created the Astro blog template:
npm create astro@latest -- --template blog
Added Tailwind CSS:
npx astro add tailwind
Configured for static output in astro.config.mjs:
export default defineConfig({
output: 'static',
// ...
});
Writing Posts
Posts are markdown files in src/content/blog/:
---
title: 'Post Title'
description: 'Brief description'
pubDate: 'Jan 31 2026'
---
Content here...
Cleaning Up the Template
The Astro blog template comes with example content. Removed what I didn’t need:
- Deleted example posts from
src/content/blog/ - Removed the separate home page - made the blog list the index
- Removed social media links from header and footer
- Deleted unused placeholder images from
src/assets/
Also tweaked the styling in src/styles/global.css:
- Reduced heading sizes (h1 from 3em to 2.2em, h2 from 2.4em to 1.6em)
- Added more spacing above headings for better readability
Staying Anonymous
I won’t write anything too personal, but I still prefer to remain anonymous.
Set local git config to anonymous:
git config user.name "anon"
git config user.email "anon@anon.anon"
Kept the GitHub repo private. Using the free *.pages.dev subdomain avoids WHOIS lookups.
Deploying to Cloudflare Pages
- Pushed repo to GitHub (private)
- Went to Cloudflare Dashboard → Add → Pages
- Connected GitHub repo
- Set build settings:
- Build command:
npm run build - Output directory:
dist
- Build command:
- Deployed
Auto-deploys on every push. Free tier, unlimited bandwidth, no surprise bills from scrapers.