mirror of
https://github.com/pawroman/zola-theme-terminimal.git
synced 2025-01-08 19:51:06 +01:00
Merge pull request #37 from goingforbrooke/patch-2
Fix: shortcode images don't load after build
This commit is contained in:
commit
9f79a41208
|
@ -1,3 +1,8 @@
|
|||
{% if src %}
|
||||
{# If the image's URL is internal to the site... #}
|
||||
{% if src is not starting_with("http") %}
|
||||
{# ... then prepend the site's base URL to the image's URL. #}
|
||||
{% set src = config.base_url ~ src %}
|
||||
{% endif %}
|
||||
<img src="{{ src | safe }}"{% if alt %} alt="{{ alt }}"{% endif %} class="{% if position %}{{ position }}{% else -%} center {%- endif %}" {%- if style %} style="{{ style | safe }}" {%- endif %} />
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue