summaryrefslogtreecommitdiffstats
path: root/templates_html/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'templates_html/shortcodes')
-rw-r--r--templates_html/shortcodes/fig.html7
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>