Table of content - Choose to display only H2 or H2 + H3

Hi Finsweet,

Would it be possible to have the option to display either the H2 or the H2 + H3 on the Table of content?

It would be perfect to choose inside an Options field in the blog post collection and then either add some custom attribute or some code.

Let me know,

Hey @geffroy.valentin! We have this option but it needs to be added manually as plain text.

You could write some code that adds this tag before each heading you’ll want to ignore and then initialize the Table of Contents Attribute with window.fsAttributes.destroy(); window.fsAttributes.toc.init();. Or by preventing the script to load with this defer fs-attributes-preventload='true' and then initializing it with the same window.fsAttributes.toc.init();.