summaryrefslogblamecommitdiffstatshomepage
path: root/templates/shortcodes/img.html
blob: 6b4eca4e27d09f092c43b2996bbb579506aa79f9 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                               
                                                                                                                                           




                                                              
{% set url = page.path ~ path | trim_start_matches(pat="/") -%}
<figure>
	<a href="/{{ url }}">
		<img src="{{ resize_image(path=url, width=500, op="fit_width", format=format | default(value="jpg")) }}" alt="{{ alt }}" />
	</a>
	{% if caption -%}
	<figcaption class="smaller">{{ caption }}</figcaption>
	{% endif -%}
</figure>