Creating Pages in Nextra
Nextra makes it easy to create pages and organize them in a side navigation. Here’s how you can do it:
Creating a Page
- Create a new
.mdxfile in theappdirectory. - Add your content using Markdown syntax.
For example, to create a page called “About”:
app/about.mdxAdding Subpages
To add subpages, create a folder and place .mdx files inside it. For example:
app/docs/
page.mdx
tutorial.mdxUpdating the Side Navigation
The _meta.jsx file controls the side navigation. Update it to include your new pages:
export default {
index: "Main Page",
tutorial: "Tutorial",
}That’s it! Your new pages will now appear in the side navigation.