| 开发者 | matthummel |
|---|---|
| 更新时间 | 2026年10月5日 11:42 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
block.json, live editor preview, Block Styles)[tocguide] shortcode for classic content and theme templatesno-toc<nav> landmark with ARIA labels~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:
[tocguide] in any shortcode/HTML element.tocguide text domain.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
[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
tocguide folder to /wp-content/plugins/, or install the ZIP through Plugins → Add New → Upload Plugin.The block is for the block editor. For classic content or a theme template, use the [tocguide] shortcode.
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.
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.
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.
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.
Yes. Add a Raw HTML element or Shortcode element with [tocguide]. TOCguide scans the rendered HTML for headings and injects IDs automatically.
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.
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.
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.
The server walks the parsed block content and extracts the first ~20 words after each heading. No JavaScript fetch, no API, no external service.
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.
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.
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.
Yes. Set Minimum headings in Settings → TOCguide.
Yes. Headings nested inside Group, Columns, Cover, and similar blocks are included in both the TOC and the Reading Guide section data.
Each instance lists the same headings from that post. Prefer one outline per page.
No. Zero external network requests from TOCguide in any mode.
GNU GPLv2 or later, covering the whole plugin (PHP, JavaScript, CSS, and images). Copyright Matt Hummel. Full text: license.txt.
No. Independent plugin by Matt Hummel. Display name TOCguide; slug, folder, and text domain tocguide. That naming is intentional for WordPress.org guideline 17.
No. Plugin CSS and JS are local. Core-bundled libraries are used where WordPress already ships them. No remote executable code.
Users with the manage_options capability (typically administrators). The welcome notice is dismissible and uses a nonce.
Deactivate leaves settings in place. Delete runs uninstall.php, which removes stored options only if you enabled “delete data on uninstall” in Settings.
theme="exclude" or theme="include".tocguide_* / TOCguide_* / TOCGUIDE_*), CSS (.tocguide, --tocguide-*), block tocguide/table-of-contents, shortcode [tocguide], option tocguide_settings, skip class tocguide-skip.matthummel-pa.github.io/tocguide.matthummel-pa/tocguide.