fix footnotes with markdownIt

This commit is contained in:
Kathleen Fitzpatrick
2024-11-29 12:35:55 -05:00
parent 78be001157
commit 3189c29117
5 changed files with 67 additions and 9 deletions

View File

@@ -3,6 +3,8 @@ import { feedPlugin } from "@11ty/eleventy-plugin-rss";
import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import pluginNavigation from "@11ty/eleventy-navigation";
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
import markdownIt from "markdown-it";
import markdownItFootnote from "markdown-it-footnote";
import pluginFilters from "./_config/filters.js";
@@ -18,6 +20,16 @@ export default async function(eleventyConfig) {
}
});
let options = {
html: true,
breaks: true,
linkify: true,
};
let markdownLib = markdownIt(options).use(markdownItFootnote);
eleventyConfig.setLibrary("md", markdownLib);
// Copy the contents of the `public` folder to the output folder
// For example, `./public/css/` ends up in `_site/css/`
eleventyConfig