badboy / mdbook-toc

A preprocessor for mdbook to add inline Table of Contents support.
Mozilla Public License 2.0
163 stars 20 forks source link

Update README.md, how to add sidebar toc? #26

Closed ghost closed 10 months ago

ghost commented 2 years ago

The rendered html with sidebar toc looks like :

image

No addition html js file , only a small piece of css file and small configuration

that's all.

badboy commented 2 years ago

Thanks for the contribution! Calling out how to style the ToC is actually a good idea, though I will edit how that's presented in the readme.

ghost commented 2 years ago

ok. for real rust book document demo:

image

https://cnmade.github.io/book/ch01-01-installation.html

onqtam commented 1 year ago

woah, this is cool!

would it be possible to not have the sidebar TOC as an element that overlaps with the book contents when we zoom in the page, but instead as a new panel on the right - like it is handled in gitbook (see the outline: https://docs.gitbook.com/organizations/member-management/roles#commenter ) & hugo? Currently, it could easily break different layouts and make things unreadable.