Configure ToC plugin to ignore the .heading-anchor element

This commit is contained in:
Helen Chong 2024-06-04 18:59:31 +08:00
parent c0f8b07d92
commit 67cb814c55
1 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,10 @@ const markdownItAnchor = require("markdown-it-anchor");
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
// Installed Plugins // Installed Plugins
eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3', 'h4', 'h5'] }); eleventyConfig.addPlugin(pluginTOC, {
tags: ['h2', 'h3', 'h4', 'h5'],
ignoredElements: ['.heading-anchor'],
});
eleventyConfig.addPlugin(embedEverything, { add: ['soundcloud'] }); eleventyConfig.addPlugin(embedEverything, { add: ['soundcloud'] });
// Configure slug filter // Configure slug filter