rehype-toc
rehype-toc copied to clipboard
Hide empty table of contents by default
Currently you can customize the installation to hide the table of contents if there are no items by doing this:
customizeTOC: (toc) => {
if (toc.children[0].children.length > 0) {
return toc;
}
return false;
},
I think this should be default functionality! 🙂