Install markdown-it-footnote plugin

This commit is contained in:
Helen Chong 2024-05-17 22:13:56 +08:00
parent b02e5d1ef4
commit 7bac81e40f
3 changed files with 11 additions and 1 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -71,7 +71,16 @@ module.exports = function (eleventyConfig) {
.use(require("markdown-it-attribution")) .use(require("markdown-it-attribution"))
.use(require("markdown-it-attrs")) .use(require("markdown-it-attrs"))
.use(require("markdown-it-bracketed-spans")) .use(require("markdown-it-bracketed-spans"))
.use(require("markdown-it-deflist")); .use(require("markdown-it-deflist"))
.use(require('markdown-it-footnote'));
// Configure markdown-it-footnote
markdownLibrary.renderer.rules.footnote_block_open = () => (
'<hr class="footnotes-sep">\n' +
'<h2>Footnotes</h2>\n' +
'<section class="footnotes">\n' +
'<ol class="footnotes-list">\n'
);
// Paired shortcode: custom container // Paired shortcode: custom container
eleventyConfig.addPairedShortcode('container', (children, el, className) => { eleventyConfig.addPairedShortcode('container', (children, el, className) => {

View File

@ -25,6 +25,7 @@
"markdown-it-attrs": "^4.1.6", "markdown-it-attrs": "^4.1.6",
"markdown-it-bracketed-spans": "^1.0.1", "markdown-it-bracketed-spans": "^1.0.1",
"markdown-it-deflist": "^3.0.0", "markdown-it-deflist": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"slugify": "^1.6.6" "slugify": "^1.6.6"
} }
} }