12
layouts/partials/image.html
Normal file
12
layouts/partials/image.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- $path := .path -}}
|
||||
{{- $alt := .alt -}}
|
||||
{{- $caption := .caption -}}
|
||||
|
||||
{{ if $path }}
|
||||
<figure class="image">
|
||||
<img src="{{- $path | absURL -}}" {{ with $alt }}alt="{{- . -}}"{{ end }} />
|
||||
{{ with $caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
Reference in New Issue
Block a user