跳到内容

Tavoos Article TOC

v1.0.0

mmhdih · 2026年10月15日 上架

An expandable article table of contents with keyboard navigation, Unicode anchors, RTL support, local assets, and no tracking.

正在使用
10 以下
评分
暂无
累计下载
191
最近更新
2026年10月16日
需要 WordPress 6.2+已测试到 7.1.5PHP 7.4+

贡献者

截图

Display settings: heading levels, threshold, placement, expansion, and scroll offset.
Display settings: heading levels, threshold, placement, expansion, and scroll offset.
An automatically generated table of contents in a Persian article.
An automatically generated table of contents in a Persian article.

Tavoos Article TOC builds a navigation box from article headings. It does not summarize prose or use AI. Article text and saved heading IDs are never rewritten in the database.

By default, it runs on single posts containing at least three H2 headings. The box appears immediately before the first eligible heading, opens on desktop (768px and up), and stays collapsed on smaller screens. Native details/summary controls support keyboard operation.

Tavoos Article TOC focuses on article navigation for Persian and other Unicode content. It combines RTL-aware styling, preserved authored heading IDs, collision-safe generated anchors, keyboard focus on the destination heading, reduced-motion scrolling, and compatibility with the original Tavoos TOC snippet. Assets are local and loaded only on eligible singular pages.

Features:

  • Heading levels H2-H6, public post types, threshold, title, position, expansion, and scroll offset settings.
  • Scoped WordPress content detection with an optional article-body CSS selector for custom themes.
  • Preserved authored IDs, collision-safe Unicode anchors, and safe aliases for duplicate authored IDs.
  • Keyboard focus moves to the selected heading; reduced motion produces immediate scrolling.
  • Native browser smooth scrolling with no animation loops; fragment history supports Back and Forward.
  • Translation-ready interface using the tavoos-article-toc text domain; logical CSS properties for RTL and LTR.
  • No external API, CDN, fonts, telemetry, cookies, or visitor storage.
  • Local files and small dependency-free JavaScript, loaded only for eligible singular content.

The plugin requires JavaScript. With JavaScript disabled, the article remains readable without a table of contents. Themes must call wp_head(), wp_footer(), and normally the_content(). Where the_content() is bypassed, set the custom article-body selector; never target body or html. A malformed selector results in no table.

Heading links are a flat ordered list with visual indentation for selected subheading levels. Headings inside nav, aside, footer, header, hidden/aria-hidden regions, .tvs-upd, .tvs-rel, .tavoos-toc-exclude or [data-tavoos-toc-exclude] are excluded. Content added after page load requires the documented refresh event.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums