Sticky Table of Contents Generator - Smart ToC Alternative

By codemplation · 5 months ago · 10+ installs

Creates a sticky, movable, and resizable table of contents on the right side with transparency on hover. Includes minimize/unminimize feature. On code hosting sites (GitHub, GitLab, Codeberg), focuses on README headers only. On other pages, includes all headers.

Key Highlights

  • Builds a right-side table of contents from h1, h2, and h3 headings
  • Highlights the active section while you scroll and supports smooth jump links
  • Panel can be moved, resized, minimized, and restored
  • Supports light and dark mode for the table of contents panel
  • Uses README headings on code hosting sites such as GitHub, GitLab, Codeberg, and Gitea

Details

This tweek places a sticky table of contents on the right side of pages that contain headings, listing h1, h2, and h3 sections for quick navigation. Clicking an entry smoothly scrolls to that section, and the current section is highlighted as you move down the page.

The panel starts minimized and can be expanded, moved, resized, and toggled between light and dark modes. On GitHub, GitLab, Codeberg, Gitea, and Gitea.com pages, it focuses on README headings when available, and it hides permalink-style header links from the table of contents entries.

Runs on

All websites

Developer

Tweek Code

602 lines ·

Sticky Table of Contents for Any Page | Tweeks