From 67cb814c55b231b5245fc667db12a615d6ee8d49 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:59:31 +0800 Subject: [PATCH] Configure ToC plugin to ignore the .heading-anchor element --- eleventy.config.md.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eleventy.config.md.js b/eleventy.config.md.js index ed286bde..85be47f5 100644 --- a/eleventy.config.md.js +++ b/eleventy.config.md.js @@ -13,7 +13,10 @@ const markdownItAnchor = require("markdown-it-anchor"); module.exports = function (eleventyConfig) { // 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'] }); // Configure slug filter