diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-08-09 17:32:32 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-08-09 17:32:32 +0300 |
| commit | 69e01c2a6d0451f9eb7ee67e9ad464e5b1f01a67 (patch) | |
| tree | 7f67e6eb0cdfc5a1ed854b8bdd6fe345e84afb26 /templates_html | |
| parent | eee25cf1d1784e599d35ef55c4642b9cee292f9d (diff) | |
Fix fig paths in now pages
Diffstat (limited to 'templates_html')
| -rw-r--r-- | templates_html/shortcodes/fig.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates_html/shortcodes/fig.html b/templates_html/shortcodes/fig.html index 4ac99b4..14b3a5e 100644 --- a/templates_html/shortcodes/fig.html +++ b/templates_html/shortcodes/fig.html @@ -1,4 +1,9 @@ +{% if src is starting_with("/") %} +{% set img_src = src %} +{% else %} +{% set img_src = page.path ~ src %} +{% endif %} <figure> - <img src="{{ src }}" alt="{{ alt }}" /> + <img src="{{ img_src }}" alt="{{ alt }}" /> <figcaption aria-hidden="true">{{ alt }}</figcaption> </figure> |
