aboutsummaryrefslogtreecommitdiff
path: root/_includes/figure
diff options
context:
space:
mode:
Diffstat (limited to '_includes/figure')
-rw-r--r--_includes/figure12
1 files changed, 12 insertions, 0 deletions
diff --git a/_includes/figure b/_includes/figure
new file mode 100644
index 0000000..8e9bdd5
--- /dev/null
+++ b/_includes/figure
@@ -0,0 +1,12 @@
+<figure class="{{ include.class }}">
+ <img src=
+ {% if include.image_path contains "://" %}
+ "{{ include.image_path }}"
+ {% else %}
+ "{{ include.image_path | relative_url }}"
+ {% endif %}
+ alt="{% if include.alt %}{{ include.alt }}{% endif %}">
+ {% if include.caption %}
+ <figcaption>
+ {{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}
+ </figcaption>{% endif %}</figure>