Site and runtime APIs
This page replaces the old VitePress-only runtime examples with patterns that work in Docusaurus (React).
Page metadata (front matter)
Each doc can set front matter at the top of the file. This page uses toc_max_heading_level to control the table of contents depth.
React in MDX
For interactive examples, add an .mdx file under docs/ and import a small React component from src/components/. See the Docusaurus docs on MDX and React.
Useful client modules
@docusaurus/router— client-side navigation (useHistory,useLocation, …).@docusaurus/useDocusaurusContext— accesssiteConfig(title,baseUrl, custom fields, …).
More
- Docusaurus theme design — customize layout by swizzling theme components when needed.