Hi
I am trying to build a website where I have list of documents , and the organization of the folders will be generated as content tree view on the side bar on the left.
So, the left sidebar will have treeview, and each folder will be a collapsable node, and every document will be a link to the document.
Is there already a template for that?
To my knowledge, no.
Probably the closest I’ve seen is the hugo documentation site. Source code is here: https://github.com/spf13/hugo/tree/master/docs. Layouts -> Partials -> menu.html contains the code for generating the collapsible menu. I don’t think it would recurse into a tree beyond one level though.
I don’t have a specific template in mind but I saw a implementation of a tree view already in the wild. Take a look at the docs of Camunda. The sidebar’s menu should come very close to your requirements. You can find the source code of the website in this repository.
Thanks mindok
yes, you are exactly right.
It is for simple menu only.
I am doing my own any way.
Thanks for the help
digitalcraftsman
this repo uses the same idea as hugo documentation. which is hard code the menu item.
Each document (md docucment) has to have a reference in its front matter for the menu.
What I am looking for is something dynamic where the menu generated from the folders.