I am addding a docs to my site.
Inside Contents folder below is the structure
└── about
| └── _index.md // <- https://example.com/about/
├── posts
| ├── firstpost.md // <- https://example.com/posts/firstpost/
| ├── happy
| | └── ness.md // <- https://example.com/posts/happy/ness/
| └── secondpost.md // <- https://example.com/posts/secondpost/
└── docs
├── doc1-folder
└── d1_a.md //// <- https://example.com/docs/doc1-folder/d1_a
└── d1_b.md
└── d1_c.md
└── doc2-folder
└── d2_a.md //// <- https://example.com/docs/doc2-folder/d2_a
└── d2_b.md
└── d2_c.md
Now to have my sidebar for listing all docs files , I have written a partial something like this
<ul class="sidebar">
<h3 class="header">DOC</h3>
{{range .Site.Home.Sections"}}
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks}}
{{end}}
</ul>
But this lists all the files inside Contents folder like -About , -Posts (the posts lists) , Docs and so on.
I want it to list like this. (Expection below)
<h3 class="header">DOC</h3>
doc1-folder (will make this accordion , just saying )
d1_a
d1_b
d1_c
doc2-folder
d2_a
d2_b
d2_c
It should list like above for sidebar , even when I am on https://example.com/docs/ OR https://example.com/docs/doc1-folder/d1_a or /doc2-folder/d2_a page.
Please help.
Basically I want to know how to list a targeted folder for documentaion sidebar