Building Sudo Scout: A Next.js Blog on Cloudflare Pages
How I built this blog with Next.js, static export, and Cloudflare Pages, with a focus on SEO and performance.
This very blog is a project I'm sharing. Here's how it's built and why.
The stack
- Next.js 14 with the App Router and static export (
output: 'export') - Tailwind CSS for styling
- Markdown posts: no CMS, just files in
content/posts/ - Cloudflare Pages for hosting (free, fast, global CDN)
Why static export?
Static export means the build produces plain HTML/CSS/JS. Cloudflare Pages serves it from a global CDN with no server to manage. It's fast, cheap, and SEO-friendly because every page is pre-rendered HTML that search engines can crawl instantly.
SEO built in
- Automatic
sitemap.xmlandrobots.txt - Per-post metadata via
generateMetadata - JSON-LD structured data for articles
- Open Graph images generated dynamically
- Canonical URLs on every page
- Semantic HTML with proper headings
Performance
- No client-side JS for content pages (only the search box and theme toggle hydrate)
- Inline critical CSS
- Lazy-loaded images
prefers-reduced-motionrespected everywhere
The result: fast, indexable, and free to run.
Share: