feat: add shortcode to resize images

This commit is contained in:
Ungol 2026-01-18 18:41:24 +01:00
parent 7106595bca
commit 0e55353be4
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,6 @@
{% set imgpath = page.colocated_path ~ path %}
{% set image = resize_image(path=imgpath, width=width | default(value=300), op="fit_width") %}
<figure>
<img src="{{ image.url }}" alt="{{ alt | default(value='') | safe }}" />
<figcaption>{{ caption | default(value=alt) | safe }}</figcaption>
</figure>