Install markdown-it-footnote plugin
This commit is contained in:
parent
b02e5d1ef4
commit
7bac81e40f
|
@ -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) => {
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue