NextGuide

MDX in NextGuide

Write documentation as editable content and let NextGuide handle navigation and rendering.

MDX, not a proprietary editor format

Write standard Markdown with optional JSX in content/docs/*.mdx. NextGuide exposes a file-first renderer and built-in plugins.

import { createDocs } from "nextguide/mdx"
import { remarkGfm, rehypeSlug } from "nextguide/mdx/plugins"

export const docs = createDocs({
  contentDir: "content/docs",
  remarkPlugins: [remarkGfm],
  rehypePlugins: [rehypeSlug],
})

This is the same pattern generated by the Developer Mode initializer. Your MDX lives in files and remains portable.

Reading pages

docs.parse({ slug }) returns parsed frontmatter, the table of contents and a React Server Component for rendering. docs.getNavigation() reads the folder structure and _meta.json; docs.getPagePaths() lists routes for static builds.

For browser-only components, the package also provides nextguide/mdx/client. Pages Router projects use docs.serialize({ slug }) with MdxClient.

Generated files · Rendering & security