hhk7734 / wiki.loliot.net

14 stars 9 forks source link

Do you have any solution in docusaurus, show h1-h5 toc in the rightbar #4

Closed frank-lam closed 3 years ago

frank-lam commented 4 years ago

Set ToC in the desired range. · Issue #2700 · facebook/docusaurus https://github.com/facebook/docusaurus/issues/2700

Only h2 and h3 will be in the toc · Issue #2914 · facebook/docusaurus https://github.com/facebook/docusaurus/issues/2914

hhk7734 commented 4 years ago

https://github.com/hhk7734/wiki.loliot.net/blob/2e76a5ef8f56c5465147f12992bc0f29505c6728/custom_node_modules/search.js#L39-L40

Set maxDepth to 5.

But it has bugs. If you use a tag, you must start 1 and use successive steps.

I always copy this to the Toc module after update.

https://github.com/hhk7734/wiki.loliot.net/blob/2e76a5ef8f56c5465147f12992bc0f29505c6728/Dockerfile#L14