nfdi4plants / web-components

DataPLANT branded web-components for diverse elements. Used in knowledgebase and main pages.
https://nfdi4plants.github.io/web-components-docs/
4 stars 3 forks source link

[feature] TOC in sidebar #27

Closed Brilator closed 1 year ago

Brilator commented 1 year ago

Is it possible to add the TOC (limited to first / second level) to the sidebar? So the reader can directly jump to subsections from the sidebar?

Freymaurer commented 1 year ago

It is possible to use up to third level headers in the sidebar.

https://nfdi4plants.github.io/web-components-docs/docs/SupportedStaticSiteGenerators.html#sidebar image

https://nfdi4plants.github.io/web-components-docs/docs/WebComponents.html#nfdi-sidebar-element

Brilator commented 1 year ago

Eh, yes. Forgot about that. I meant to build it automatically. But that's a different issue as the sidebar titles are also independent of article titles.

Brilator commented 1 year ago

Well and I meant to have those sub-sections dynamically only show in the sidebar as long as the article is open.

Freymaurer commented 1 year ago

Currently, you would need to add a sidebar for each article. With it's own sidebar toc.