rehype-toc icon indicating copy to clipboard operation
rehype-toc copied to clipboard

Hide empty table of contents by default

Open ZachSaucier opened this issue 7 months ago • 0 comments

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! 🙂

ZachSaucier avatar Nov 07 '23 02:11 ZachSaucier