Why I Built a Static Blog
March 6, 2025
The way people consume content has fundamentally changed. Most readers today get content through social media, large news sites, or on their mobile phones. Small personal blogs compete for limited attention, which means every performance bottleneck is a reason for readers to leave.
The Tech Stack: Focused on Speed
The blog is built using Claude Code and I wanted the blog to be super performant. Here's the tech stack:
- TypeScript: Type safety reduces bugs and improves maintainability
- Markdown: Simple content authoring without fighting formatting
- Nunjucks: Lightweight templating with minimal overhead
- SCSS: Clean styling with variables and nesting
- Static HTML: Pre-rendered pages with zero server runtime
- Cloudflare Pages: Global CDN with edge caching
Each library was chosen for a specific purpose:
- gray-matter: Parses frontmatter in markdown files
- marked: Converts markdown to HTML quickly
- 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
The Deployment Workflow
The deployment process is straightforward:
- Write content in markdown
- Push to GitHub
- GitHub Actions builds the static site
- Deploy to Cloudflare Pages
- Content is served from Cloudflare's global edge network
This approach eliminates server-side processing completely. When a reader visits the blog, they get cached HTML directly from the nearest Cloudflare edge location. The result is consistently fast load times around the world.
Mobile Optimization
Mobile visitors make up the majority of web traffic today. This blog was built with a mobile-first approach:
- Responsive design that works on all screen sizes
- Minimal JavaScript (almost none)
- Optimized assets and font loading
- Sub-second load times even on slower connections
Why You Should Blog Too
If you're considering starting a blog, don't overthink the platform. Focus on:
- Writing consistently
- Optimizing for speed and mobile
- Sharing your unique perspective
The barriers to publishing have never been lower. Static site generators, free hosting on GitHub Pages or Cloudflare Pages, and simple markdown content make it easy to start. Start simple, focus on speed, and write regularly. Most importantly, have fun while you're at it.