Add Table of Contents (TOC) to every page in your GitBook.
It adds anchors link to headings inside the page as well.
Add the plugin to your book.json:
{ "plugins": [ "page-toc" ], "pluginsConfig": { } }selector: CSS selector to select the elements to put anchors on- Default:
.markdown-section h1, .markdown-section h2, .markdown-section h3, .markdown-section h4, which include headings from level 1 to level 4.
- Default:
position: Position of TOC- Allowed values:
before-first(default) : Before the first headingtop: On top of the page
- Allowed values:
The TOC elements have class attribute .page-toc. You can override the styles in styles/website.css.