Socket
Socket
Sign inDemoInstall

doctoc

Package Overview
Dependencies
15
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    doctoc

Generates TOC for markdown files of local git repo.


Version published
Weekly downloads
59K
decreased by-1.09%
Maintainers
1
Install size
1.34 MB
Created
Weekly downloads
 

Readme

Source

DocToc build status

NPM

Generates table of contents for markdown files inside local git repository. Links are compatible with anchors generated by github or bitbucket via a command line flag.

Table of Contents generated with DocToc

Installation

npm install -g doctoc

Usage

Adding toc to all files in a directory and sub directories

Go into the directory that contains you local git project and type:

doctoc .

This will update all markdown files in the current directory and all its subdirectories with a table of content that will point at the anchors generated by the github markdown parser.

Adding toc to a single file

If you want to convert only a specific file, do:

doctoc /path/to/file
Example
doctoc README.md

In order to add a table of contents whose links are compatible other sites add the appropriate mode flag:

Available modes are:

--bitbucket	bitbucket.org
--nodejs	  nodejs.org
--github	  github.com
--gitlab	  gitlab.com
--ghost	    ghost.org
Example
doctoc README.md --bitbucket

Bitdeli Badge

Keywords

FAQs

Last updated on 12 Jan 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc