Search code examples
github-pagestableofcontents

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


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?


Solution

  • 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.