Skip to Content
KTB Health Docs
Tutorials

Writing content

How MDX pages, frontmatter, and folder metadata work.

Every page under content/docs/<locale>/ (en, pt-BR) is an .mdx file with YAML frontmatter.

Frontmatter

---
title: Page title
description: One-line summary shown in listings and SEO tags.
icon: BookOpen # optional, a lucide icon name
---

title and description are required by convention — fumadocs uses them for the page tree, search index, and llms.txt output.

Folder metadata

Each section folder has a meta.json that controls its title and page order:

{ "title": "How-to guides", "pages": ["dev-environment", "deploy-to-cloudflare"] }

Pages not listed in pages are appended after the listed ones.

Audience tabs

Top-level audience folders (doctors, patients, developers, business) carry "root": true in their meta.json — that flag turns the folder into a fumadocs layout tab: the tab bar switches between audiences and the sidebar shows only the active audience's tree. The root meta.json controls tab order via its pages array.

Useful endpoints

  • /<locale>/docs/<path>.md — the page as raw markdown (content negotiation on Accept: text/markdown redirects here too).
  • /llms.txt and /llms-full.txt — LLM-friendly indexes of all pages.
  • /api/search — Orama-powered full-text search backing the docs UI.

On this page