Skip to Content
DocumentationCore ConceptsRouting with App Router

Routing with App Router

Next.js App Router introduces a new file-based routing system using nested layouts and server components.

In this setup:

  • Dynamic routes like [[...mdxPath]] allow Nextra to automatically map any .mdx file into a live route.
  • generateStaticParamsFor() and importPage() are used to render these routes at build time.
  • The folder /src/content/ becomes the source of your content tree.
export const generateStaticParams = generateStaticParamsFor('mdxPath');
💡
Tip

You don’t need to define every route manually — it’s fully automated.

Last updated on