Skip to content

Auto generate top navigation bar

Current situation:

Currently we support with a module the sidebar. It works by building the sidebar that iterats through the folders inside the docs dir. Based on the names of the folders it creates the Sidebar like this:

docs
 |--a_folder
    |-- a_file.md
    |-- README.md
 |--another_folder
    |-- another_file.md
    |-- README.md

etc...

Solution

I was thinking of a simple convention for the navbar and the sidebar to build the navbar:

docs
 |--a_Folder                           # folder name is used to build the a navbar link
    |-- README.md                      # if only has a README no sidebar is displayed
 |--another_folder                     # Another Link for the sidebar
    |--a_Folder                        # In this case if there is a nested folder then a sidebar will be created
       |--a_file.md
       |--README.md