HB ToC Scollspy Module

Automatically update table of content navigation to indicate which heading is currently active in the viewport.

Modulegithub.com/hbstack/toc-Scollspy
Repository⭐ Please consider giving a star if your like it.
Stars
Version
Used by
Requirements
License
UsageSee 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.

Integration

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>

Site Parameters

border

NameContextTypeRequiredDefaultSince
borderhb.toc_scrollspyboolean-truev0.2.0

Whether to show left border.

razonyang
Saturday, September 21, 2024 Saturday, September 21, 2024