From 859272b2a570c9b78e4b615c61ab352c035db967 Mon Sep 17 00:00:00 2001 From: Nathan Upchurch Date: Tue, 5 Mar 2024 13:40:56 -0600 Subject: [PATCH] Implement smartquotes --- eleventy.config.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index abd0344..f015dd9 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -115,25 +115,31 @@ module.exports = function(eleventyConfig) { }); // Customize Markdown library settings: + let markdownItOptions = { + html: true, + typographer: true + }; + + let mdLib = markdownIt(markdownItOptions); + eleventyConfig.amendLibrary("md", mdLib => { - mdLib.use(markdownItAnchor, { + mdLib + .use(markdownItAnchor, { permalink: markdownItAnchor.permalink.ariaHidden({ placement: "after", class: "header-anchor", symbol: "#", - ariaHidden: false, // Features to make your build faster (when you need them) - - // 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"); + ariaHidden: false }), level: [1, 2, 3, 4], slugify: eleventyConfig.getFilter("slugify") - }).use(markdownItFootnote).use(mdfigcaption, figoptions); + }) + .use(markdownItFootnote) + .use(mdfigcaption, figoptions); }); + eleventyConfig.setLibrary("md", mdLib); + return { templateFormats: [ "md",