Is it possible to generate an automatic Table of Contents using Github Flavoured Markdown?
Is it possible to generate an automatic Table of Contents using Github Flavoured Markdown
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I created two options to generate a toc for github-flavored-markdown:
DocToc Command Line Tool (source) requires node.js
Installation:
npm install -g doctocUsage:
doctoc .to add table of contents to all markdown files in the current and all sub directories.DocToc WebAppIf you want to try it online first, go to the doctoc site,
paste the link of the markdown page and it will generate a table of
content that you can insert at the top of your markdown file.
Github Wikis and Anchors
As Matthew Flaschen pointed out in the comments below, for its wiki pages GitHub previously didn’t generate the anchors that
doctocdepends on.UPDATE: However, they fixed this issue.