Search code examples
githubgithub-pages

Github Pages: Automatic Table of Contents on a page with jekyll-theme-minimal or some other them which can be switched to easily?


I have blog which uses Github Pages & is forked from jekyllnow.

I use the jekyll-theme-minimal in my _config.yml (I think this may be inherited from jekyllnow, I don't remember).

On each page, I want an automatic Table of Contents (TOC) generated using all the #, ##, ### tags.

Is this possible with jekyll-theme-minimal or if not, then through some other theme which will can be easily moved to. I have a lot of existing pages & I don't want to change themes in a way which will require a lot of changes to make the existing pages work jut fine with it.


Solution

  • Found a Liquid Based TOC which is trivial to integrate - https://github.com/allejo/jekyll-toc