Why I Built a Static Blog
Most readers find content through social media on their phones. Small personal blogs compete for limited attention. Every performance bottleneck is a reason to leave.
The Stack
I built this blog with Claude Code and optimized it for speed:
- TypeScript: Type safety reduces bugs
- Markdown: Content authoring without fighting formatting
- Nunjucks: Lightweight templating with minimal overhead
- SCSS: Styling with variables and nesting
- Static HTML: Pre-rendered pages, zero server runtime
- Cloudflare Pages: Global CDN with edge caching
Each library serves one purpose:
- gray-matter: Parses frontmatter in markdown files
- marked: Converts markdown to HTML
- highlight.js: Syntax highlighting for code snippets
- sanitize-html: Prevents XSS attacks in content
- sass: Preprocesses SCSS to optimized CSS
- fs-extra: Simplifies file operations
- nunjucks: Renders templates with inheritance
- slugify: Creates clean URL-friendly slugs
Deployment
- Write content in markdown
- Push to GitHub
- GitHub Actions builds the static site
- Deploy to Cloudflare Pages
- Content serves from Cloudflare's global edge network
No server-side processing. Readers get cached HTML from the nearest Cloudflare edge location. Load times stay consistent worldwide.
Mobile First
Mobile visitors make up the majority of web traffic. This blog reflects that:
- Responsive design across all screen sizes
- Almost no JavaScript
- Optimized assets and font loading
- Sub-second load times on slower connections
Start One
Do not overthink the platform choice. Write consistently, optimize for speed and mobile, and share your perspective.
Static site generators plus free hosting on GitHub Pages or Cloudflare Pages plus markdown content — the setup takes an afternoon. Start simple, write regularly.