mdtoc

mdtoc, short for markdown table of contents, creates a table of contents for Markdown documents.

Markdown table of contents is useful because in additional to providing an overview of the document, it also allows you to jump between headers for easy navigation! For example, try this link which brings you to the TODO section of this README.

Table of Contents

  1. mdtoc
    1. Overview
    2. Demo
    3. TODO

Overview

```bash ~ $ mdtoc --help mdtoc 0.2.0 Jack jchoi5@me.com generate table of contents for markdown

USAGE: mdtoc [OPTIONS]

FLAGS: -h, --help Prints help information -V, --version Prints version information

OPTIONS: -b, --bullet Bullet to use for the lists, for example '*', '-', '1.' [default: 1.] -t, --indent Number of space character, ' ', to use to represent a single indent [default: 4]

ARGS: Markdown file to read ```

Demo

```bash ~ $ cat in.md

README

tWo 1

tHReE 1

TWo 2

~ $ mdtoc in.md

Table of Contents

  1. README
    1. tWo 1
      1. tHReE 1
    2. TWo 2 ```

TODO

  1. output the original md with toc inserted into it?