An opinionated Table of Contents generator for Github. This allows only one level headings - specified via comments, and supports only heading level 5 for all items. Why? Too much bold text and headings spoil readability for certain type of content.
For a fully featured Table of Contents generator, use https://github.com/thlorenz/doctoc
npm install -g tocgen
tocgen README.md
Table of Contents
- Usage
- Generating ToC
tocgen README.mdvar tocgen = require('tocgen');
tocgen(file).then(function() {
console.log('success');
});You can choose where to place your Table of Contents. The ToC will be placed between START and END. By default it will be the beginning of the file.
<!-- START table-of-contents -->
<!-- END table-of-contents -->Hidden headings
Generally to specify the category name or group name
<!-- heading: My Awesome Collection of Points -->These become the visible headings and will support only level 5 headings (5 hashes #####)
##### My Awesome Point 1
Points