lukasgeiter / mkdocs-awesome-pages-plugin

An MkDocs plugin that simplifies configuring page titles and their order
MIT License
452 stars 35 forks source link

Possible to build full nav in directory? #91

Closed joawan closed 7 months ago

joawan commented 7 months ago

Given a structure like

docs/
  index.md
  folder1/
    file.md
    file2.md

and a .pages file like

nav:
  - index.md
  - title
    - folder1/file.md
    - folder1/file2.md

This renders an NavEntryNotFound error.

If setting a title like

    - File 2: 'folder1/file2.md'

there is no error thrown, but the link in the nav becomes folder1/file2.md and thereby a 404.

Is there a way to build a nav structure with subfolders etc?

kamilkrzyskow commented 7 months ago

Instead of title you should write folder1 without any structure beneath it. Then if you want to set a title or change the structure of that folder's nav you create a .pages file inside that folder.

kamilkrzyskow commented 7 months ago

Here is an example: https://github.com/Gothic-Modding-Community/gmc/blob/dev/docs/.pages https://github.com/Gothic-Modding-Community/gmc/blob/dev/docs/zengin/.pages

joawan commented 7 months ago

So basically any folder I want to change the default structure of, I would need to add a .pages too?

kamilkrzyskow commented 7 months ago

Yes