Implement smartquotes

This commit is contained in:
Nathan Upchurch 2024-03-05 13:40:56 -06:00
parent ea72be3b17
commit 859272b2a5

View File

@ -115,25 +115,31 @@ module.exports = function(eleventyConfig) {
}); });
// Customize Markdown library settings: // Customize Markdown library settings:
let markdownItOptions = {
html: true,
typographer: true
};
let mdLib = markdownIt(markdownItOptions);
eleventyConfig.amendLibrary("md", mdLib => { eleventyConfig.amendLibrary("md", mdLib => {
mdLib.use(markdownItAnchor, { mdLib
.use(markdownItAnchor, {
permalink: markdownItAnchor.permalink.ariaHidden({ permalink: markdownItAnchor.permalink.ariaHidden({
placement: "after", placement: "after",
class: "header-anchor", class: "header-anchor",
symbol: "#", symbol: "#",
ariaHidden: false, // Features to make your build faster (when you need them) ariaHidden: false
// If your passthrough copy gets heavy and cumbersome, add this line
// to emulate the file copy on the dev server. Learn more:
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
}), }),
level: [1, 2, 3, 4], level: [1, 2, 3, 4],
slugify: eleventyConfig.getFilter("slugify") slugify: eleventyConfig.getFilter("slugify")
}).use(markdownItFootnote).use(mdfigcaption, figoptions); })
.use(markdownItFootnote)
.use(mdfigcaption, figoptions);
}); });
eleventyConfig.setLibrary("md", mdLib);
return { return {
templateFormats: [ templateFormats: [
"md", "md",