diff --git a/.eleventy.js b/.eleventy.js index cd20e1d..335d222 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,4 +1,5 @@ const markdownIt = require('markdown-it'); +const markdownItAnchor = require('markdown-it-anchor'); const markdownItFootnote = require('markdown-it-footnote'); module.exports = function (eleventyConfig) { @@ -14,7 +15,9 @@ module.exports = function (eleventyConfig) { let options = { html: true, }; - let markdownLibrary = markdownIt(options).use(markdownItFootnote); + let markdownLibrary = markdownIt(options) + .use(markdownItAnchor) + .use(markdownItFootnote); eleventyConfig.setLibrary('md', markdownLibrary); return { diff --git a/package.json b/package.json index d48d31e..ba5200e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ }, "devDependencies": { "@11ty/eleventy": "2.0.1", + "markdown-it-anchor": "8.6.7", "markdown-it-footnote": "3.0.3", "npm-run-all": "4.1.5", "prettier": "3.0.1", diff --git a/yarn.lock b/yarn.lock index 498c98f..511478c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1538,6 +1538,11 @@ map-obj@^4.1.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== +markdown-it-anchor@8.6.7: + version "8.6.7" + resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" + integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== + markdown-it-footnote@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz#e0e4c0d67390a4c5f0c75f73be605c7c190ca4d8"