Closed noamtamim closed 6 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In the "Leap Day" theme, this is solved with javascript (based on jquery). Relevant parts:
An empty list is added in the layout file:
And a script loads the TOC and add the list items:
This script is registered in layout:
See also this https://github.com/pages-themes/cayman/issues/16#issuecomment-326620674 where {:toc}
is mentioned.
I did not managed to use the {:toc}
inside the default.html
layout file, even with the inputs from https://github.com/jekyll/jekyll/issues/5843
At the end I have switched to jekyll-toc, a solution built on top of the liquid templating engine.
This works well on GitHub pages.
As seen on Leap Day.
I prefer this theme visually, but the on-this-page TOC is a nice touch.