Template

Authoring content

How to add docs, blog posts, legal pages, and authors as MDX.

Every content surface in this template is plain MDX under content/, loaded through fumadocs. Every entry owns a folder named for its public slug; the default source is index.mdx, translations are index.<locale>.mdx, and images live beside them. The /docs root is the natural exception: content/docs is already its owning folder, so its sources live directly there.

Collections

FolderRouteNotes
content/docs/docs/<slug>One folder per page; ordered by metadata
content/blog/blog/<slug>One folder per Post
content/legal/legal/<slug>One folder per page; git-derived dates
content/authors/authors/<slug>One folder per author

Collection metadata such as meta.json describes navigation rather than a content entry, so it stays at the collection or group root.

One folder per entry

The folder path defines the public slug consistently across collections:

content/docs/guides/content/index.mdx  →  /docs/guides/content
content/legal/privacy/index.mdx       →  /legal/privacy
content/blog/my-first-post/index.mdx  →  /blog/my-first-post
content/authors/jordan-lee/index.mdx  →  /authors/jordan-lee

There is no registration step — add the folder and its index.mdx, and the entry appears.

A Post folder

A Post owns its MDX and every image in one folder. The default locale is index.mdx, translated variants are index.<locale>.mdx, and the Cover always uses the fixed filename cover.png:

content/blog/my-first-post/
  index.mdx
  index.zh.mdx
  cover.png
  architecture.png

Frontmatter carries only authored content. cover contains alt text; its source is discovered from the fixed filename:

---
title: "My first post"
description: "A short summary used for the card, meta, and JSON-LD."
date: "2026-06-16"
author: "jordan-lee"
tags: ["Guides"]
cover:
  alt: "Describe the cover"
---

Your post body here.

![An architecture diagram](./architecture.png)

Use ordinary Markdown image syntax and a relative path for inline images. Fumadocs resolves these files during the build, so a wrong or missing path fails the build; rendered images use optimized, hashed asset URLs with intrinsic dimensions.

An author folder

Authors follow the same convention. Their fixed portrait filename is portrait.png, and frontmatter carries only its alt text:

content/authors/jordan-lee/
  index.mdx
  index.zh.mdx
  portrait.png
portrait:
  alt: "Portrait of Jordan Lee"

Per-locale variants

Every translation uses index.<locale>.mdx inside the entry's folder, so all variants automatically share its images. When a translation is missing, the page falls back to the default-language file — see i18n & SEO.

On this page