Assemble middleware for creating a table of contents in the generated HTML, using Cheerio.js
JavaScript
Switch branches/tags
Latest commit 35a643a Sep 25, 2015 @doowb doowb updating related list
Permalink
Failed to load latest commit information.
docs
.editorconfig
.gitattributes
.gitignore
.jshintrc
.verb.md
LICENSE
README.md
index.js
package.json

README.md

grunt-assemble-toc NPM version

Assemble middleware for adding a Table of Contents (TOC) to any HTML page.

Quickstart

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.

Options

toc

Type: String Default: 'toc'

Tag to determine where the table of contents is located

modifier

Type: String Default: ''

CSS class used in the wrapper ul for the table of contents.

Usage Examples

assemble: {
  options: {
    plugins: ['grunt-assemble-toc'],
    toc: {
      id: 'toc',
      modifier: ''
    }
  }
}

Assemble plugins

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Brian Woodward

License

Copyright © 2015 Brian Woodward Released under the MIT license.


This file was generated by verb-cli on September 25, 2015.