Commit graph

3 commits

Author SHA1 Message Date
Heitor Pascoal de Bittencourt bef4cc9020
shortcodes: use async and lazy for images.
Zola v0.18 added an option to set all images with `decoding=async` and
`load=lazy`, but this only applies to `<img>` tags generated from
Markdown `![]()` syntax. This patch adds these attributes by default to
`figure` and `image` macros.
2024-02-06 15:31:27 -03:00
Brooke f8026666f3
Fix: shortcode images don't load after build
This fixes an issue where images added with the [`image` shortcode](https://github.com/pawroman/zola-theme-terminimal#image) are visible via `zola serve` but not `zola build`.

It works by [prepending](https://tera.netlify.app/docs#concatenation) the site's base URL to external image URLs so `https://www.awesomesite.com/flower.png` is just as valid as `http://127.0.0.1:1111/flower.png`.

External images are differentiated from internal images by the presence of `http` at the beginning of their URL.

Fixes issue #36.
2023-05-10 21:21:49 -07:00
Paweł Romanowski deee53f745 First public release 2019-02-05 18:27:02 +00:00