When JSON fits

JSON is a good fit for structured data: navigation links, footer columns, site config. It is not a good fit for long prose.

When Markdown fits

Markdown is a good fit for pages, posts, and anything with paragraphs and headings. It is not a good fit for nested menus or config.

Mixing both

A SvelteKit project can use both:

  • src/lib/data/*.json for config and navigation.
  • src/content/*/*.md for pages and posts.

Both are readable without a build step. Both can be edited by a CMS.

Summary

Use JSON for structure and Markdown for prose. Do not force one format to do both jobs.