Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bit-docs-html-toc

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bit-docs-html-toc

table of contents bit-docs plugin

  • 0.6.3-0
  • pre
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

bit-docs-html-toc

npm version Build Status

A table of contents for use with bit-docs-generate-html.

screen shot 2016-11-10 at 10 16 55

screen shot 2016-11-10 at 10 15 51

screen shot 2016-11-09 at 17 02 17

Use

To use, add bit-docs-html-toc to your bit-docs dependencies in package.json:

{
  ...

  "bit-docs": {
    "dependencies": {
      "bit-docs-html-toc": "$VERSION"
    }
  }
}

Where $VERSION is the latest version on npm.

In your template add a class on-this-page-container:

<div class="on-this-page-container"></div>

By default, all heading tags children of the first article tag on the page will be collected to create the table of contents; if you want to use a different element just do:

<div 
  class="on-this-page-container"
  data-heading-container-selector="#my-custom-selector"
>
</div>

The table of contents will be injected into this element at run time.

To control the number of child headers that will be included in the TOC, use the @outline tag like so:

@outline 2

This will include <h2> and <h3> elements, rather than the normal <h2> only.

Keywords

FAQs

Package last updated on 27 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc