Understanding navigation is key to setting up you content properly,
especially sidebar and content links.
First, lets understand how page links are built from content structure.
content directory represents a root of your app
index.mdx) must exist in
and it will be entrypoint (
/) of your app.
- every link is derived from file name, e.g. file
/myPage, so just extension is stripped
- link to the page is also derived from the relative path from
each directory in
content is a part of page path, e.g. file
content/mygroup directory will have link
- directories can be organized in groups (making a sidebar group) or
subgroups (groups which are expandable and have nested pages).
- to create a subgroup with nested pages, you need to
- create directory with nested pages, e.g.
- in same directory as just created dir, create file
which will be a "parent" of the nested group
- to create group, you need to:
Let's follow this example of project file and directory structure:
│ │── my_page1.md
│ │── myPage2.md
│ │── my_subpage.md
Structure defined as above, will generate following page paths (links).
index.md => /
page1.md => /page1
page2.md => /page2
page2/subpage.md => /page2/subpage
group1/my_page1.md => /group1/my_page1
group1/myPage2.md => /group1/myPage2
group1/myPage2/my_subpage.md => /group1/myPage2/my_subpage