Back to feed
Dev.to
Dev.to
5/11/2026
Static Sites With YAML Data in Next.js 15 App Router

Static Sites With YAML Data in Next.js 15 App Router

Short summary

A practical guide to building fast, zero-runtime static Next.js sites using YAML files as your data layer. The tutorial covers directory structure, TypeScript type safety, static generation with generateStaticParams, and real-world application on solitaireassociation.com. Best for directories with known entities, daily updates, and git-based version control; graduate to a headless CMS when you need multi-user editing workflows.

  • YAML files eliminate need for database or CMS for static sites with known entities
  • Next.js 15 generateStaticParams creates one HTML file per entity at build time
  • Use this pattern for fast deployment, zero runtime cost, and git-based version control

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more