You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With https://github.com/toshimaru/jekyll-toc (that as now it doesn't work for GitHub Pages) it's possible to add a selector in the post settings and select for which posts the table of contents must be shown.
This project has nothing to do with the YAML frontmatter and only works with the Jekyll-generated HTML. What you can do in your theme though is, if the toc frontmatter is true, give the heading the ".no_toc" class (as per #21), and that heading will be excluded from the generated TOC.
Thanks @allejo for the quick reply and sorry for misunderstanding!
I'm new to jekyll, sorry again. What do you mean with in your theme ?
I guess something like this (using CSS selectors for markdown):
### Heading3
{: .no-toc }
If this is the case it won't be good as I need the TOC only for 1 post and ignore it for all the others.
Adding a class for all the headings in all other posts won't be easy.
That's why I mentioned the YAML frontmatter selector.
Take a look at the Minimal Mistakes Jekyll theme, which makes use of this project. If you put toc: false in your front matter, you can access that from your Liquid templates via page.toc like so,
Description
With https://github.com/toshimaru/jekyll-toc (that as now it doesn't work for GitHub Pages) it's possible to add a selector in the post settings and select for which posts the table of contents must be shown.
Sample Usage
e.g.
It's possible to define
toc: true/false
to decide in the post markdown content if the TOC should be generated or not.As far as I know this isn't working for this repository.
Expected TOC
toc: true
: HTML TOC generatedtoc: false
: HTML TOC not generatedThe text was updated successfully, but these errors were encountered: