images with captions
All checks were successful
Build / Deploy (push) Successful in 1m57s

This commit is contained in:
Rik Berkelder 2025-02-11 21:11:06 +01:00
parent 13994c5175
commit 15b10c5186
3 changed files with 11 additions and 3 deletions

View file

@ -28,6 +28,14 @@ export default async function (eleventyConfig) {
//Images
eleventyConfig.addPlugin(eleventyImageTransformPlugin);
eleventyConfig.addShortcode("figure", (url, alt, caption) => {
return `
<figure>
<img src="${url}" alt="${alt}" />
<figcaption>${caption}</figcaption>
</figure>
`;
});
eleventyConfig.addPassthroughCopy("content/robots.txt");
}