Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zoubin/tocify

Build table of contents from markdown directory structure
https://github.com/zoubin/tocify

Last synced: 8 days ago
JSON representation

Build table of contents from markdown directory structure

Awesome Lists containing this project

README

        

# tocify
Build a TOC for markdown files, meant to work with github pages (built with jekyll).

## Install

`npm install --save-dev tocify`

## Usage

In `package.json`:

```json
{
"scripts": {
"toc": "tocify docs > README.md"
}
}

```

Then `README.md` would be the index page with navigation links (toc) to pages built from markdown files in the directory `docs`.

## Options

```
Usage: tocify [options]

Options:

-V, --version output the version number
-d, --toc-dir directory where the toc file is meant to host
-e, --ext extname of markdown files (default: .md)
-m, --max-level max level of header should be rendered (default: 2)
-s, --word-splitter word splitters in path (default: _)
-h, --help output usage information

```