1.0.11 • Published 6 years ago

tocsify v1.0.11

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

šŸ“‹ tocsify

NPM version NPM downloads Build Status Dependencies Status DevDependencies Status License: MIT

šŸ“‹ npm module that generates a table of contents based on the file structure of a Docsify docs directory!

Features

  • Adds relative path to title in each top-level entry for context.
  • Skips markdown files beginning with _.
  • Allows users to specify maxdepth for cleaner generation.
  • Skips generation for headers marked {docsify-ignore}
  • If {docsify-ignore-all} exists in a top level header (# Example Header {docsify-ignore-all}), skip generating the table of contents for the entire document.

Installation

Install globally for use in any Docsify project!

npm install -g tocsify

Usage

  Usage
    $ tocsify docs --file=docs/toc.md

  Options
    --verbose, -v   Write output to stdout.
    --file, -f      Write output to file.
    --header, -h    Include a descriptive header. Default is true.
    --maxdepth, -m  Specify max level header(1 - 6) to output. Default is 3.

  Examples
    $ tocsify docs --file=docs/toc.md
    $ tocsify docs --verbose --file=docs/toc.md
    $ tocsify docs --maxdepth=2
    $ tocsify docs --header=false

Integration

Integration with a Docsify homepage is easy!

In index.md or _sidebar.md, paste the snippet below where the Table of Contents should appear:

## Table of Contents
[filename](toc.md ':include')

A working index.md file can be found in the docs directory here for reference.

1.0.11

6 years ago

1.0.9

6 years ago

2.0.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago