Writing
Markdown and MDX authoring guide
Write documentation using markdown and MDX.
Markdown
Standard markdown syntax is fully supported:
MDX
Use React components directly in MDX files:
Components are available globally via the MDX config.
Code blocks
Syntax highlighting with language detection:
Add a title to code blocks:
Twoslash
Enable twoslash annotations in fenced code blocks with the twoslash meta flag:
fromsrc parses twoslash markers and renders typed query/completion notes under the code block.
Frontmatter
Every MDX file needs frontmatter:
Fields
| field | type | required | description |
|---|---|---|---|
| title | string | yes | page title |
| description | string | no | SEO description |
| order | number | no | sort order in sidebar |
File structure
Organize docs by topic:
Links
Link to other pages using relative paths:
External links automatically get an icon:
Math
Write math equations using LaTeX syntax. fromsrc includes Math components powered by KaTeX.
Usage
Math components are available globally.