While creating README.md being tidy is important for readability. In my opinion creating Table of Content makes it better. If you have long document, to doing that take so much time. While writing markdown in Github, there is no options to create that automatically. When i was searching about doing that I have just find such a good script to create ToC automatically.
To install that script:
1 2 |
wget https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc chmod a+x gh-md-toc |
There are few way to use that script to create Toc. I’ll use stdin method.
1 |
./gh-md-toc File.md |
When execute command, Markdown’s codes gonna appear on terminal you can paste to the beginning of yourfile.md
More explained on this repository:
https://github.com/ekalinin/github-markdown-toc#remote-files
Another one which is work with Ruby
http://jennifermack.net/2015/04/01/a-table-of-contents-generator-for-ulysses-and-markdownxl/
Have a nice coding 🙂