Multiple TOC Styles

Is it possible to have multiple ToC styles?

Use Case: I would like to apply different TOC based on the article. For extra long pieces, I would like to show H1 and H2 in TOC for the majority of other articles, H1 ONLY will be fine.
Example:
First Article, want to show only H1 in the TOC
Second Article, want to show H1 & H2 in the TOC

All the plugins for TOC that I’ve seen work with a global config and don’t let you set it per page/post.

You might be able to use the Jekyll-toc include though. That allows params (h_min and h_max) each time you include it on a page. So in theory you could do a TOC starting at h1 and the on another page one with h1 and h2.

1 Like

Thanks for the idea! I am going to just deal with my solo style for now.