From 832e1d07fdda3d5e4a4d12875ca6ee383048a191 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:25:00 +0800 Subject: [PATCH] Add enableLazyLoading parameter to figure element paired shortcode --- eleventy.config.md.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eleventy.config.md.js b/eleventy.config.md.js index ed286bde..aa84db61 100644 --- a/eleventy.config.md.js +++ b/eleventy.config.md.js @@ -104,10 +104,10 @@ module.exports = function (eleventyConfig) { }); // Paired shortcode: image figure and figcaption - eleventyConfig.addPairedShortcode('imgFigure', (caption, img, alt=caption) => { + eleventyConfig.addPairedShortcode('imgFigure', (caption, img, alt=caption, enableLazyLoading=true) => { const figcaption = markdownLibrary.renderInline(caption); return `
- ${alt} + ${alt}
${figcaption}
`; });