tocgen

0.0.3 • Public • Published

tocgen

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.

Install

npm install -g tocgen

Usage

tocgen README.md

Generating ToC

Table of Contents

CLI
tocgen README.md
NodeJS API
var tocgen = require('tocgen');
tocgen(file).then(function() {
  console.log('success');
});
ToC location

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 -->
Visible headings - Level 5

These become the visible headings and will support only level 5 headings (5 hashes #####)

  ##### My Awesome Point 1
 
  Points

Readme

Keywords

Package Sidebar

Install

npm i tocgen

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • boopathi