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?
Asked
Active
Viewed 9,619 times
2 Answers
13
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.

Adrian J. Moreno
- 14,350
- 1
- 37
- 44
-
3Thanks! Actually, you need to add `* TOC {:toc}` once you added `markdown: kramdown` to your `_config.yml`. – orschiro Jan 17 '19 at 21:11
-
3Still not working. Can you link your repo where it works? – PeterT Mar 09 '21 at 17:33
-
1We need to insert a new line to let TOC be rendered `* Placeholder for Table of Content (Must not be removed)
{:toc}` – Sunfarm Aug 03 '21 at 17:28
-1
You have to wrap the ToC contents between TOC and /TOC fields in the README.md file.

Sush
- 1
- 2
-
404 on https://github.com/write2sushma/TaxiDataPipeLine – Titi Wangsa bin Damhore May 22 '22 at 14:38