Generate or inject "Table of Contents" for markdown file.
-
Download the zip from releases
-
unzip the tar file
$ tar -xzf toc
-
Copy the binary to
bin
directory.$ sudo cp toc /usr/local/bin
Run toc
to see the help message.
$ toc
Generate table of contents
$ toc gen "README.md"
Inject table of contents to the file.
$ toc gen "README.md" -i