dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
site/templates/shortcodes/image.html (710B)
1<figure
2 class="{% if class is defined %}{{ class | safe }}{% else -%} center {%- endif %}">
3 {%- if static is defined -%}
4 <img
5 loading="lazy"
6 decoding="async"
7 src="{{ get_url(path=src) | safe }}"
8 {%
9 if
10 alt
11 %}
12 alt="{{ alt }}"
13 {%
14 endif
15 %} />
16 {%- else -%} {%- set src = page.path ~ src -%}
17 <img
18 loading="lazy"
19 decoding="async"
20 src="{{ get_url(path=src) | safe }}"
21 {%
22 if
23 alt
24 %}
25 alt="{{ alt }}"
26 {%
27 endif
28 %} />
29 {%- endif -%} {% if caption %}
30 <figcaption
31 {%
32 if
33 caption_style
34 %}
35 style="{{ caption_style | safe }}"
36 {%
37 endif
38 %}>
39 {{ caption }}
40 </figcaption>
41 {% endif %}
42</figure>