This commit is contained in:
1 parent
862f12b4d0
commit
e0c315d837
30 files changed
+2575
-3561
No files matched your search
@@ -1,4 +1,4 @@
|
||||
const Image = require('@11ty/eleventy-img');
|
||||
import Image from "@11ty/eleventy-img";
|
||||
|
||||
const defaultSizes = `
|
||||
(max-width: 300px) 300px,
|
||||
@@ -48,7 +48,7 @@ const remoteImageShortcode = async (src, alt, cls, sizes = defaultSizes, widths
|
||||
// You bet we throw an error on missing alt in `imageAttributes` (alt="" works okay)
|
||||
return Image.generateHTML(metadata, imageAttributes);
|
||||
}
|
||||
module.exports = function(eleventyConfig) {
|
||||
export default function(eleventyConfig) {
|
||||
eleventyConfig.addShortcode("image", imageShortcode);
|
||||
eleventyConfig.addAsyncShortcode("remoteImage", remoteImageShortcode);
|
||||
}
|
||||
Reference in new issue
Block a user