Each MDX file in the target directory will become its own route,
index.mdx serving as the base route, i.e.
With the following directory structure:
docs/ index.mdx getting-started.mdx api.mdx
mdx-go will create routes for
mdx-go also supports using React components as routes for files with the
Be sure that the
.js file exports a default component to render as a route.
// example React component route import React from 'react' export default props => <h1>Hello</h1>
Each page can customize its name, path, and other metadata using exports.
To set a custom name for the route, export a
export const name = 'Getting Started' # Getting Started
To set a custom path, without renaming the file, export a
export const path = '/go' # Getting Started