da95259743
In order to add an image to a post, just use the following syntax: {% include image image_path="/full/path/to/MyPostImage.png" caption="The optional image caption" %} or {% include image image_path="https://example.com/images/MyPostImage.png" caption="The optional image caption" alt="The optional alt text" %}
12 lines
417 B
Text
12 lines
417 B
Text
<figure class="{{ include.class }}">
|
|
<img src=
|
|
{% if include.image_path contains "://" %}
|
|
"{{ include.image_path }}"
|
|
{% else %}
|
|
"{{ include.image_path | absolute_url }}"
|
|
{% endif %}
|
|
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
|
|
{% if include.caption %}
|
|
<figcaption>{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}</figcaption>
|
|
{% endif %}
|
|
</figure>
|