Skip to main content

Sections & MDX

Builtin sections​

Every readme follows the same layout. projectDescription is not a section β€” it is the tagline under the title β€” while the others are rendered as ## headings in this exact order:

#Section keyHeadingNotes
β€”projectDescription(header tagline)Rendered in the header, not as a section
1aboutπŸ’‘ About the projectPrepends the screenshot and, on root, the members table
2features✨ Features
3gettingStartedπŸŽ‰ Getting started
4installationπŸ“‹ InstallationAuto-derived from registry when omitted
5usageπŸ”§ Usage
6roadmapπŸš€ RoadmapNon-empty roadmaps get a open issues link appended
7(custom sections)(the key, as written)Rendered in insertion order
8contributingπŸ’» ContributingOptional; links the code of conduct when found
9contactπŸ“¨ ContactNot configurable β€” author, X handle, email, repo
10acknowledgmentsπŸ‘ Acknowledgments
11licenseπŸ“„ LicenseNot configurable β€” rendered from the detected license

A collapsible <details> table of contents lists every rendered section, and backToTop: true appends a back to top link after each one.

Custom sections​

Any key of sections that is not one of the nine builtin keys becomes a custom section, titled exactly as the key. Insertion order is preserved, so you control where it lands in the readme:

sections: {
// …required builtin sections…
"⛑️ Support": "Software is still **very early**, expect breaking changes",
Benchmarks: "\n- parse 1.2M lines/s\n- render 400 readmes/s",
}

Custom sections render between roadmap and contributing.

Skipping a section​

Set it to an empty string. renderSections skips empty bodies, and validate warns you about them:

sections: {
// …
roadmap: "", // omitted from the readme, warning from validate
}

MDX overrides for workspace members​

Members can override a section per folder, straight from their own directory, without touching the root config:

packages/core/
β”œβ”€β”€ deno.json
└── readma/
└── sections/
└── usage.mdx
  • The file name (usage) is the section key β€” builtin or custom.
  • The MDX content is compiled to HTML through @mdx-js/mdx and rendered with React, so you can import components inside it.
  • Only workspace members get this treatment; the root readme is fully driven by the config.
  • Empty or broken files are skipped with a warning and the config value is used instead.

Precedence for a member section body:

  1. readma/sections/<key>.mdx inside the member folder,
  2. the sections.<key> value from readma.config.ts,
  3. for installation only: the automatic install snippet derived from the language and registry.

The contact and license sections​

Two sections are fully automatic and not driven by sections:

  • Contact β€” author, the X handle link, the email (email@domain.domainExt) and the repository link.
  • License β€” links the license file on the current branch with the detected SPDX identifier, or renders None when no license is found.