Closed kevalrathod closed 7 months ago
Hey, you should be able to add this class to that heading to skip it. ‘js-toc-ignore’ Let me know if that doesn’t work for you. https://github.com/tscanlin/tocbot/blob/b2e30cfb5eace87c6eb6e99845c4f3df40e471e6/README.md?plain=1#L140
Hey I have added this. Thanks for the response.
ignoreSelector:'.relative h2
and this is working.
Just note that will skip all h2's so that may or may not be what you want. You could change to this to just do the first:
ignoreSelector:'.relative h2:first-child'
or add the default class to the HTML element
<h2 id="..." class="js-toc-ignore">The Heading</h2>
Anyway, glad you figured it out!
I want to exclude the header(h2) inside the relative div container like below code.
Problem is that h2 header is still render in the table of content. This is my config.
You can check this issue live text inside h2 in CTA is rendered in table of contet.