How to generate a Table of Contents (ToC) on a rendered Github Pages README.md?

Viewed 7498

Is there a way to generate a ToC on a rendered README.md hosted on Github Pages that doesn't require the use of local Jekyll plugins to generate it prior to uploading it to Github Pages?

2 Answers

According to this post, all you have to do is add {:toc} in your markdown page at the place you want a table of contents.

You have to wrap the ToC contents between TOC and /TOC fields in the README.md file.

Related