Coder Social home page Coder Social logo

droxey / tocsify Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 39 KB

๐Ÿ“ฆ npm module to generate a ToC based on your docs directory filestructure!

Home Page: https://www.npmjs.com/package/tocsify

License: MIT License

JavaScript 100.00%
markdown docsify npm-package table-of-contents cli table documentation readme index toc

tocsify's Introduction

๐Ÿ“‹ tocsify

NPM version NPM downloads Build Status

๐Ÿ“‹ 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.

tocsify's People

Contributors

droxey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

tocsify's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.