Skip to main content

Feature deep-dive · SaaSForge Starter

MDX blog template for Next.js (with docs, RSS, and JSON-LD)

MDX blog template for Next.js (with docs, RSS, and JSON-LD)

MDX blogs are one of those things that sound trivial, 'just render Markdown', until you actually want a production-quality blog with structured data, RSS, sitemap, ISR, and code-block highlighting. Doing it well in Next.js 16 takes more than `next-mdx-remote` and a `getStaticProps`. BoilerlyKit ships the full surface across all four templates so blog and docs are not a sprint after launch.

Content as files, not as CMS rows

Each post lives in `content/blogs/<slug>.mdx` with frontmatter (title, description, publishedAt, author, tags). Each doc lives in `content/docs/<slug>.mdx`. Git is the versioning layer; PR review is the editorial workflow; there is no admin UI to log into, which is the right answer for technical content where the developer and the author are the same person.

SaaSForge Agency is the exception, it uses Directus for marketing-side content because agencies hand off CMS access to clients. The MDX docs surface still exists on Agency too, used for the template's own setup documentation.

What the renderer does for you

Each blog page emits: a BlogPosting JSON-LD node with author, publisher, and date metadata; a BreadcrumbList JSON-LD node; canonical URL; Open Graph and Twitter card metadata; auto-generated table of contents from headings; syntax-highlighted code blocks. Each doc page emits the same but with TechArticle JSON-LD instead.

Sitemap entries are generated from the same file discovery pass that builds the pages. RSS 2.0 feed at `/rss.xml` enumerates the blog posts in reverse chronological order with full content. None of this is opt-in, it is wired by default so the SEO surface is correct on day one.

Frontmatter conventions in content/blogs/<slug>.mdx
---
title: "RAG in a SaaS template: what to wire first"
description: "Where to spend the first sprint on a RAG product."
publishedAt: "2026-05-11"
updatedAt: "2026-05-11"
author: "BoilerlyKit"
tags: ["ai", "rag", "nextjs"]
---

Real RAG pipelines have five stages...

ISR, incremental updates without rebuilds

Blog and docs pages use ISR with a 1-hour revalidation window in the default config. Editing a post and pushing to main triggers a Vercel deploy as usual; ISR is the safety net for content that needs to update without a full rebuild (e.g., scheduled publishing via a flag in frontmatter).

For static export mode (`output: 'export'` in `next.config.ts`), ISR is disabled but the rest of the blog surface still works, you just rebuild on each content change. That option exists for buyers who host on S3 or Cloudflare Pages instead of Vercel.

Why not a CMS-backed blog?

CMS-backed blogs trade git history for an admin UI. For technical content authored by developers, that trade is rarely worth it, code reviews on PRs are a better editorial workflow than a draft button in an admin panel.

If you do want CMS-backed content, SaaSForge Agency shows the pattern using Directus 11. The other three templates lean MDX-first because their buyer profiles (indie makers, AI founders, B2B teams) typically have developers writing the content.

Frequently asked

Can I use a different syntax highlighter?
The templates ship with Shiki for syntax highlighting because it produces accurate, theme-aware output at build time without a client-side JS payload. Swapping to Prism or rehype-highlight is a config change in the MDX pipeline, a contained edit, not a rewrite.
How does it handle images in blog posts?
Images go in `public/blog/<slug>/` and are referenced by absolute path in MDX. The Next.js `<Image>` component handles optimization, lazy loading, and responsive sizing. For large blogs you would typically move images to a CDN; the pattern stays the same since `next/image` supports remote loaders.
Is there a search experience for the blog?
The MDX templates do not ship a hosted search by default, for most blog volumes, Google site search and the on-page tag filter are enough. For larger content sites, Pagefind or Algolia DocSearch drop in cleanly because the content is already structured Markdown.
Can the MDX docs and blog share components?
Yes, MDX supports JSX, so a shared component library is one import away. The templates ship a small set of MDX components (callouts, code blocks with copy buttons, embedded video) usable in both blog and docs. Author-defined custom components register globally.
Ships in SaaSForge Starter

See SaaSForge Starter. Skip the deliberation.

Full source code. Lifetime updates. Polar Merchant-of-Record checkout. Private GitHub repo on purchase.