Assemble middleware for creating a table of contents in the generated HTML, using Cheerio.js
MIT License
Assemble middleware for adding a Table of Contents (TOC) to any HTML page.
In the command line, run:
npm install grunt-assemble-toc --save-dev
Next, to register the plugin with Assemble in your project's Gruntfile you can either specify the direct path to the plugin(s) (e.g. ./path/to/plugins/*.js
), or if installed via npm, make sure the plugin is in the devDependencies
of your project.js package.json, and simply add the module's name to the plugins
option:
assemble: {
options: {
plugins: ['grunt-assemble-toc', 'other/plugins/*.js']
}
}
Visit the plugins docs for more info or for help getting started.
Type: String
Default: 'toc'
Tag to determine where the table of contents is located
Type: String
Default: ''
CSS class used in the wrapper ul
for the table of contents.
assemble: {
options: {
plugins: ['grunt-assemble-toc'],
toc: {
id: 'toc',
modifier: ''
}
}
}
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Brian Woodward
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb-cli on September 25, 2015.