Programmatic SEO

Generate hundreds of SEO-optimized pages from JSON data at build time using generateStaticParams.

Generate hundreds of landing pages from structured JSON data. Perfect for "[Tool] alternatives", "[City] guides", and "[Topic] resources" pages. All pages are statically generated at build time (SSG).

How It Works

  1. Data lives in JSON files under content/programmatic/
  2. Route at app/(marketing)/p/[slug]/page.tsx renders each page
  3. generateStaticParams() pre-builds all pages at build time
  4. Each page gets unique <title>, meta description, and JSON-LD structured data

Files

lib/features/programmatic-seo.ts         — loadCollection(), getPage(), getAllPages()
components/features/programmatic-seo/
  page-template.tsx                       — Page template component
content/programmatic/
  alternatives.json                       — Sample data (3 pages)
app/(marketing)/p/[slug]/page.tsx         — Route handler with generateStaticParams

Setup

1

Create your data file

Create content/programmatic/alternatives.json:

[
  {
    "slug": "slack-alternatives",
    "title": "10 Best Slack Alternatives in 2026",
    "description": "Looking for Slack alternatives? Compare the top 10...",
    "h1": "Best Slack Alternatives",
    "content": "Slack has been the go-to team communication tool...",
    "category": "Team Communication",
    "items": [
      {
        "name": "Discord",
        "description": "Originally built for gamers...",
        "pricing": "Free / Nitro $9.99/mo",
        "url": "https://discord.com"
      }
    ],
    "relatedSlugs": ["notion-alternatives"]
  }
]
2

Build to generate pages

pnpm build

Pages are generated at /p/{slug} — e.g., /p/slack-alternatives.

3

Customize the template

Edit components/features/programmatic-seo/page-template.tsx to match your design, update layout/typography, and modify the JSON-LD schema for your content type.

4

Add more collections

Create additional JSON files in content/programmatic/ — e.g., cities.json, tools.json, resources.json. All collections are loaded automatically by getAllPages().

Data Schema

Required fields

FieldTypeDescription
slugstringURL path (e.g., "slack-alternatives")
titlestring<title> tag
descriptionstringMeta description
h1stringMain heading
contentstringIntro paragraph

Optional fields

FieldTypeDescription
categorystringCategory badge
itemsarrayList items to display (name, description, pricing, url)
relatedSlugsstring[]Slugs of related pages

Custom fields are accessible in the template via page.customField.

Tips

  • All pages are statically generated — zero runtime cost per request
  • Pages are automatically included in Next.js sitemap generation
  • Build time scales linearly with the number of items — hundreds of pages add only seconds to the build

Demo Mode — Explore freely. Some actions are restricted. demo@launchfst.dev / demo1234

Get LaunchFst →