345b8e6960dca1a71183a827384b8ca2fb616e0a
bludit-toc
A Bludit plugin that automatically generates a Table of Contents from the h2/h3/h4 headings in an article.
- Desktop — sticky sidebar fixed to the left of the viewport
- Mobile — floating button that opens a slide-up drawer
- Scroll-spy highlights the currently visible section
- Works with any Bludit theme; no theme modification required
Installation
- Copy the
bludit-tocfolder into your Bludit installation'sbl-plugins/directory. - Go to Admin → Plugins and activate Bludit ToC.
Settings
| Setting | Default | Description |
|---|---|---|
| Sidebar title | On this page |
Label shown above the ToC list and in the mobile drawer. |
| Navbar height (px) | 80 |
Pixel offset applied to heading anchors so they clear a fixed navbar on hash-jump. |
| Fixed sidebar min-width (px) | 1280 |
Viewport width at which the desktop sidebar appears. Below this the mobile FAB is used. |
Theme compatibility
The plugin looks for the article content in this order:
.content.entry-content.post-contentarticlemain
Bludit's default page template uses .content, so it works out of the box.
Colors adapt automatically:
- Light/dark mode via
prefers-color-scheme - If the host theme exposes
--accent,--text-muted, or--bg-primaryas CSS custom properties, the plugin inherits them seamlessly
License
MIT © spleenftw
Description
A Bludit plugin that auto-generates a table of contents from h2/h3/h4 headings.
44 KiB
0 Stars
1 Watchers
0 Forks
Languages
PHP
100%