diff --git a/src/_config/shortcodes.js b/src/_config/shortcodes.js index 1c9a7f51..d983d403 100644 --- a/src/_config/shortcodes.js +++ b/src/_config/shortcodes.js @@ -21,9 +21,12 @@ export default function(eleventyConfig) { }); // Image figure and figcaption - eleventyConfig.addPairedShortcode('imgFigure', (caption, img, alt=caption, enableLazyLoading=true) => { + eleventyConfig.addPairedShortcode('imgFigure', ( + caption, img, alt=caption, className, enableLazyLoading=true + ) => { + const classMarkup = className ? ` class="${className}"` : ""; const figcaption = markdownLibrary.renderInline(caption); - return `
+ return ` ${alt}
${figcaption}
`;