I have a layout in my Jekyll site for regular Markdown page, in which I'd like to place an outline of the page's headings. Can I access these headings in Jekyll or have them rendered in some other way, and if so, how?
Asked
Active
Viewed 345 times
2 Answers
3
In the depths of the answers to a tangentially related StackOverflow question, I found this answer:
https://github.com/allejo/jekyll-toc provides very easy way to add TOC to your jekyll page.
- Download the latest toc.html file (caution! should be raw file)
- copy this file to _includes folder.
- add this line before {{content}}: {% include toc.html html=content %}

Vincent
- 4,876
- 3
- 44
- 55
1
There is also jekyll-toc from toshimaru on GitHub. You can configure which level you want to parse, h1 to h6.

KargWare
- 1,746
- 3
- 22
- 35