Article Table of Contents
Long articles with multiple sections should have a table of contents with schema markup
Long articles with multiple sections should have a table of contents with schema markup
| Rule ID | content/article-toc |
| Category | Content |
| Scope | Per-page |
| Severity | info |
| Weight | 3/10 |
Solution
Add a table of contents with links to each section. Mark it up with ItemList schema containing ListItem elements with position, name, and url (fragment identifier) properties.
The rule only applies to article pages that are long (by min_word_count) or have several section headings (by min_headings), and warns when the table of contents is missing or present without ItemList schema.
Options
This rule supports the following configuration options:
| Option | Type | Default | Description |
|---|---|---|---|
min_word_count | number | 1500 | Minimum article length (words) before a table of contents is expected |
min_headings | number | 3 | Minimum number of h2/h3 section headings before a table of contents is expected |
Configuration Example
squirrel.toml
toml[rules."content/article-toc"]
min_word_count = 1500
min_headings = 3Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["content/article-toc"]Disable all Content rules
squirrel.toml
toml[rules]
disable = ["content/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["content/article-toc"]
disable = ["*"]