Generate a TOC in markdown file