About Page
This is the about page content written in MDX format.
Features
- ✅ MDX support
- ✅ Dynamic routing
- ✅ Static generation
How it works
- The
generateStaticParamsfunction inpage.tsxgenerates theaboutparameter - Next.js tries to import
about.mdxwhen the page is accessed - The MDX content is rendered as a React component
Example code
// This is how the MDX file is imported
export default async function DocsPage({
params,
}: {
params: Promise<{ p: string }>;
}) {
const { p } = await params;
const { default: Component } = await import(`./${p}.mdx`);
return <Component />;
}