An enhanced version of gitbook-plugin-toc
.
Note: All titles must come with a pre-defined ID to prevent hash conflicts, this is a major difference from the original gitbook plugin.
{
"plugins": ["toc-ng"],
"pluginsConfig": {
"toc": {
"addClass": true,
"className": "toc"
}
}
}
In terminal, invoke the following command
gitbook install
<!-- toc -->
# titleA {#titleA}
whatever
## titleB {#titleB}
whatever