Automatically update table of content navigation to indicate which heading is currently active in the viewport.
Module | github.com/hbstack/toc-Scollspy |
---|---|
Repository | ⭐ Please consider giving a star if your like it. |
Stars | |
Version | |
Used by | |
Requirements | |
License | |
Usage | See how to use modules. |
To use this module, you can either using existing modules, such as Blog’s ToC Scrollspy and Docs’s ToC Scrollspy, or integrating the module into your custom layout.
Firstly, import the module, and then append the data-bs-spy
and data-bs-target
attributes into the content container element.
1<div class="content" data-bs-spy="scroll" data-bs-target="#TableOfContents">
2 CONTENT HERE
3</div>
border
Name | Context | Type | Required | Default | Since |
---|---|---|---|---|---|
border | hb.toc_scrollspy | boolean | - | true | v0.2.0 |
Whether to show left border.