Linux 软件免费装
Banner图

TOCguide

开发者 matthummel
更新时间 2026年10月5日 11:42
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

block table of contents toc reading guide study tools

下载

1.5.0 1.6.2 1.6.3 1.6.15 1.6.4

详情介绍:

TOCguide adds a Table of Contents block to the WordPress block editor. It is an independent plugin by Matt Hummel and is not affiliated with any other company or plugin. Optional Reading Guide mode turns the outline into a reading companion (section previews, read time, progress). Every feature is rendered server-side or handled in the browser with no external API calls, no accounts, and no tracking. Standard TOC features Reading Guide mode Enable Reading Guide in the block sidebar to transform the TOC into a live reading companion. Every enrichment is computed from your block content — no JavaScript fetches, no third-party services. Section content previews — The opening sentence of every section appears beneath its TOC link, extracted server-side from your block content. Readers scan the outline and know exactly what they are about to read before they click. Content density bars — A subtle bar under each item shows that section's word count as a proportion of the longest section. Readers see at a glance which sections are brief and which are deep dives. Per-section read-time estimates — Word count divided by average reading speed gives a ~N min badge next to each link. Readers can decide what to read and how long it will take. Reading progress — As a reader scrolls past each section, its TOC item fades out. The outline becomes a live checklist of what has been read and what remains. Author section notes — Write a short teaser or hook for any section directly in the block editor's Section Notes panel. Readers reveal it with a single tap (✍ button). The note is stored in block attributes — no database round-trip. Emoji reactions — Readers react to individual sections (💡 Insightful · ⭐ Saved · 🤔 Unclear · ✅ Got it) with a single click. Choices are stored in the browser's localStorage. No accounts, no server calls, no tracking. Per-section academic citations — A § button on each TOC item copies a fully formatted academic citation for that specific section. Five formats supported: APA, MLA, Chicago, Harvard, and plain link. Citation data comes entirely from WordPress post meta (author, title, site name, published date, permalink). Ideal for research blogs, documentation sites, and long-form journalism. Compatibility TOCguide is designed to work with every major WordPress stack: Source and development Unminified JavaScript and SCSS ship in src/. Compiled assets are in build/. From the GitHub repo: npm install && npm run build. Node 20+ (see .nvmrc). PHP coding standards: composer install && composer phpcs. This plugin does not load JavaScript or CSS from a third-party CDN. Front-end assets are enqueued from files inside the plugin. The GitHub Pages marketing site may load a webfont; that is not part of the plugin zip. Third-party services None. TOCguide does not call remote APIs, does not require an account, and does not send data off-site. Details: https://github.com/matthummel-pa/tocguide/blob/main/PRIVACY.md Privacy No personal data collection, no marketing cookies, no phone-home. Settings live in the tocguide_settings option. Uninstall deletes data only if you opted in under Settings → TOCguide. Deactivate does not delete settings. Optional JSON-LD is off by default. Study tools that use localStorage stay on the visitor's device. Credits on the front end TOCguide does not print a “powered by” or credit link on published posts. How to use
  1. Edit a post that contains Heading blocks.
  2. Insert the Table of Contents block (typically after the introduction).
  3. Optionally open the Reading Guide panel in the block sidebar to enable any of the reading companion features.
  4. Open Settings → TOCguide to auto-generate the block, choose Fixed left, set colours and type, or set a scroll offset.
Shortcode [tocguide] Layout & behavior: title, showtitle, titletag, h1–h6, ordered, numbering, markers, collapsible, collapsed, close, focus, sticky, fixed, compact, columns, underline, highlight, maxheight, min, smooth, style, theme, export. fixed="1" keeps the outline in a left column on a wide single post or page. Reading Guide: preview="1" (hover tooltip on links), guide="1" (full Reading Guide mode), previews="1", density="1", readtime="1", progress="1", reactions="1", citations="1", citation="apa|mla|chicago|harvard|plain". Study assistant: rprogress="1" (document progress bar), bookmark="1" (resume last heading), rnotes="1" (private reader note pads). Examples: [tocguide title="On this page" style="boxed" preview="1"] [tocguide guide="1" previews="1" readtime="1" reactions="1" citations="1"] Skip a heading Add the CSS class no-toc or tocguide-skip to a Heading block (Advanced → Additional CSS class(es)). Support Documentation and support: https://matthummel-pa.github.io/tocguide/ Issues: https://github.com/matthummel-pa/tocguide/issues

安装:

  1. Upload the tocguide folder to /wp-content/plugins/, or install the ZIP through Plugins → Add New → Upload Plugin.
  2. Activate TOCguide.
  3. Add the Table of Contents block to a post that contains headings, or enable auto-insert under Settings → TOCguide.

屏幕截图:

  • Settings → TOCguide: auto-insert, design tokens, study tools, accessibility.
  • Block sidebar in the editor (heading levels, layout, Reading Guide).
  • Docs & Support tab in wp-admin (links to the documentation site).

升级注意事项:

1.6.15 Fixed left stays with the post on blog and archive pages. On a single post or page, wide screens still keep the outline in a left column of the main content. 1.6.13 Show page is easier to find in focused reading. Click it or press Escape to restore the rest of the page. 1.6.12 Focused reading now keeps a Show page control. Press Escape or click it to restore the rest of the page. 1.5.0 One tocguide identity for PHP, CSS, the block, shortcode, and settings. Re-insert the Table of Contents block and re-save Settings if you used an earlier zip.

常见问题:

Does it work with the classic editor?

The block is for the block editor. For classic content or a theme template, use the [tocguide] shortcode.

Does it work with Elementor?

Yes. Add a Shortcode widget to your Elementor layout and enter [tocguide]. TOCguide automatically reads headings from your Elementor Heading widgets (via the stored widget JSON) and injects matching ID anchors into the rendered page so all TOC links scroll correctly. No extra plugin or configuration needed.

Does it work with Divi?

Yes. Add a Code module or Shortcode module to your Divi section and enter [tocguide]. TOCguide scans the rendered page HTML for headings and injects the correct anchor IDs.

Does it work with Bricks Builder?

Yes. Paste [tocguide] into a Bricks Code element or Shortcode element. TOCguide reads headings directly from Bricks' element meta (heading and rich-text elements) and injects the correct IDs.

Does it work with Beaver Builder?

Yes. Add an HTML module or Shortcode module containing [tocguide]. TOCguide uses [tocguide] detected in Beaver Builder data to ensure headings receive the correct anchor IDs.

Does it work with WPBakery / Visual Composer?

Yes. Add a Raw HTML element or Shortcode element with [tocguide]. TOCguide scans the rendered HTML for headings and injects IDs automatically.

Does it work with Oxygen Builder or Breakdance?

Yes. Insert [tocguide] via a Shortcode element or Code Block. TOCguide detects the shortcode in Oxygen/Breakdance meta and handles heading ID injection through the rendered HTML.

Can it co-exist with my SEO plugin (Yoast, Rank Math)?

Yes. The optional JSON-LD schema is off by default. If you enable it, turn off TOC schema in your SEO plugin (or vice versa) to avoid duplicate structured data. The <nav> landmark itself does not conflict with any SEO plugin.

Will the links scroll to my headings?

Yes. Matching anchor IDs are added automatically. Custom HTML anchors on a heading are respected. Smooth scrolling and a pixel offset are configurable under Settings → TOCguide.

How are section previews generated?

The server walks the parsed block content and extracts the first ~20 words after each heading. No JavaScript fetch, no API, no external service.

How do emoji reactions work?

Each reader's choices are stored in their browser's localStorage. Nothing is sent to your server or any third party. If two readers use the same browser profile they see the same reactions, but reactions are per-device and never aggregated.

How are citations generated?

Citations are built from data already in WordPress: the post author's display name, post title, blog name, published date, and permalink. The § button constructs the formatted string in JavaScript and copies it to the clipboard. The citation includes the section anchor (#slug) so it links directly to that section.

Where does Fixed left put the outline?

On a wide screen, a single post or page keeps the outline in a left column of the main content. The header and the rest of the page stay put. On a small screen, and on blog or archive pages, the outline stays with the post.

Can I hide the TOC on short posts?

Yes. Set Minimum headings in Settings → TOCguide.

Does it work in columns or groups?

Yes. Headings nested inside Group, Columns, Cover, and similar blocks are included in both the TOC and the Reading Guide section data.

Can I have more than one TOC on a page?

Each instance lists the same headings from that post. Prefer one outline per page.

Is any data sent off-site?

No. Zero external network requests from TOCguide in any mode.

What license is TOCguide under?

GNU GPLv2 or later, covering the whole plugin (PHP, JavaScript, CSS, and images). Copyright Matt Hummel. Full text: license.txt.

Is TOCguide affiliated with another product?

No. Independent plugin by Matt Hummel. Display name TOCguide; slug, folder, and text domain tocguide. That naming is intentional for WordPress.org guideline 17.

Does it load scripts or fonts from a CDN?

No. Plugin CSS and JS are local. Core-bundled libraries are used where WordPress already ships them. No remote executable code.

Who can change settings?

Users with the manage_options capability (typically administrators). The welcome notice is dismissible and uses a nonce.

What happens when I delete the plugin?

Deactivate leaves settings in place. Delete runs uninstall.php, which removes stored options only if you enabled “delete data on uninstall” in Settings.

更新日志:

1.6.15 1.6.14 1.6.13 1.6.12 1.6.11 1.6.10 1.6.9 1.6.8 1.6.7 1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.0