Open aress31 opened 1 year ago
So far to add a custom CSS class to the TOC is to use the following workaround:
eleventyConfig.addPlugin(toc, { wrapper: undefined, }); eleventyConfig.addFilter("bootstrapToc", (tocHtml) => { if (tocHtml) { return tocHtml .replace(/<ol>/g, `<ol class="list-group">`) .replace(/<li>/g, `<li class="list-group-item">`); } return tocHtml; });
Would be nice to have a built-in feature to achieve the same results.
So far to add a custom CSS class to the TOC is to use the following workaround:
Would be nice to have a built-in feature to achieve the same results.