Support & docs · Download (free) · Report a bug
A lightweight, server-rendered Table of Contents block for the WordPress block editor. Drop it into a post and it automatically builds a clean, linked outline from your headings — fast, SEO-friendly, and accessible out of the box.
TOCflow is the free core of a freemium product. See
CLAUDE.mdfor the architecture notes and the Pro roadmap.
- Zero config — add the block; the outline builds itself from your headings.
- Server-rendered — the list is in the initial HTML, so search engines and screen readers see it immediately (no JavaScript required on the front end).
- Accurate anchors — matching
ids are injected into your headings automatically, so every link scrolls to the right place. - Accessible — output is a proper
<nav>landmark. - Focused — one block done well, not a bloated block library.
- Auto-generates the TOC from H2 / H3 / H4 headings
- Toggle which heading levels are included
- Numbered or bulleted list
- Color, spacing, and typography controls via standard block settings
This README is written as an SOP. Follow the section that matches what you're doing.
- Get the plugin. Download
tocflow.zipfrom the Releases page. - Install. In WordPress admin: Plugins → Add New → Upload Plugin, choose the ZIP, click Install Now, then Activate.
- Add the block. Edit a post that has Heading blocks. Click +, search “Table of Contents,” and insert it (usually right after your intro).
- Customize (optional). With the block selected, open the Settings sidebar to set the title, choose which heading levels appear (H2/H3/H4), and switch between a numbered or bulleted list.
- Verify. Preview the post and click a TOC link — it should jump to the matching heading.
Full walkthrough, troubleshooting, and FAQ: docs/USER_SOP.md.
# 1. Fork on GitHub, then clone your fork:
git clone https://github.com/<your-username>/tocflow.git
cd tocflow
# 2. Install build tooling:
npm install
# 3. Build in watch mode while you work:
npm run start
# ...or a one-off production build:
npm run buildMake the plugin visible to a local WordPress site (e.g. wp-env, Local, or by
copying this folder into wp-content/plugins/tocflow), then activate it and test.
The compiled
build/directory is git-ignored — you must build at least once before the plugin runs.
Full setup, coding standards, testing checklist, and release steps:
docs/DEVELOPER_SOP.md.
- Branch off
main(feat/…,fix/…,docs/…). - Make your change; run
npm run lint:js,npm run lint:css,npm run build. - Confirm the block inserts, renders, and links scroll correctly.
- Open a Pull Request against
mainand fill in the template.
See CONTRIBUTING.md and CODE_OF_CONDUCT.md.
- Bump the version in all four places so they match:
tocflow.php,package.json,src/block.json, andreadme.txt(Stable tag). - Add a dated entry to
CHANGELOG.mdandreadme.txt. npm run buildthennpm run plugin-zipto producetocflow.zip.- Commit, tag (
git tag vX.Y.Z && git push --tags), and publish a GitHub Release with the ZIP attached.
tocflow.php Plugin header + PHP helpers + heading-id filter
src/
block.json Block metadata, attributes, supports
index.js Block registration
edit.js Editor UI
render.php Server-side front-end render
style.scss Front-end styles
editor.scss Editor-only styles
build/ Compiled output (generated by npm run build)
docs/ USER_SOP.md, DEVELOPER_SOP.md
- User SOP — install, use, troubleshoot
- Developer SOP — build, branch, test, release
- Contributing · Code of Conduct · Changelog
- CLAUDE.md — architecture + roadmap