內容簡介
Axismundi Table of Contents 外掛提供一個動態的內容列表,根據當前文章的標題生成,並具備滾動偵測功能,能標示出使用者正在閱讀的部分,提升文章的可讀性與導航便利性。
【主要功能】
• 自動生成文章標題的目錄
• 滾動偵測功能,標示當前閱讀標題
• 支援側邊欄或可摺疊的內容上方顯示
• 可自訂顯示的標題層級(h2-h4)
• 支援無序或有序列表格式
• 兼容主題的目錄樣式,並提供 Material Design 3 風格
外掛標籤
開發者團隊
原文外掛簡介
Axismundi Table of Contents provides the axismundi/toc block: a dynamic,
server-rendered list built from the current post’s headings, with a scroll-spy
that marks the section you are reading.
The block render and a render_block_core/post-content filter share one
deterministic slug function, so the table-of-contents anchors always match the
heading ids — regardless of render order or where you place the block (a template
aside or inside the content). Author-provided HTML anchors are respected, and
duplicate headings are de-duplicated (-2, -3).
Two placements: a sidebar rail, or a collapsible disclosure above the
content (a native
section). A “Table of contents (above content)” pattern ships the disclosure
ready to drop before the post content.
Builds from h2–h4 by default (configurable per block).
Unordered list by default; switch to a numbered (ordered) list per block.
Emits the shared toc-list / toc-h2…h4 / is-current class vocabulary so a
theme’s table-of-contents skin couples for free; ships a Material Design 3
token skin (with fallbacks) in the meantime.
Scroll-spy marks the current heading and clears when you leave the content
(above the first heading or past the post content).
