images with captions
All checks were successful
Build / Deploy (push) Successful in 1m57s
All checks were successful
Build / Deploy (push) Successful in 1m57s
This commit is contained in:
parent
13994c5175
commit
15b10c5186
3 changed files with 11 additions and 3 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue