DocsBuild
Markdown and MDX
Two formats for content pages: .md when you only need Markdown, .mdx when you need components.
.md: pure Markdown
A .md file is pure content. Nexy renders it with cmarkgfm (GFM), adds heading IDs, derives a
table of contents, and wraps it in the nearest layout.*.
# About
Nexy is a fullstack Python meta-framework.- Frontmatter in
.mdis not used as Python logic. If you need server logic, use.nexy. - Layout wrapping, error pages and dynamic segments work the same way as other pages.
.mdx: Markdown with components
.mdx files are compiled by Vite, through the framework route pipeline (React or Preact). Python
only writes the thin wrapper that serves the route; it never compiles or renders MDX itself.
Components are rendered by the framework, server-rendered like other component routes, and
pre-rendered to HTML by nx build.
- Requires
useFFto be React or Preact. - Requires the optional packages
@mdx-js/rollup,remark-gfmand@mdx-js/react(and@mdx-js/esbuildfor the build). Vite tells you which one is missing. - The framework is auto-detected from imports: Preact when the file imports
preact, React otherwise.
Next steps
- .nexy files: the native page format
- Views: choose a format
- i18n: internationalization