Create main parts of short codes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<figure>
|
||||
{{ with .Get "href" }}
|
||||
<a href="{{ . }}">
|
||||
{{ end }}
|
||||
<img
|
||||
{{- with .Get "alt" }}alt="{{ . }}"{{ end }}
|
||||
{{- $filename := .Get "src" }}
|
||||
{{ $resource := .Page.Resources.Get $filename -}}
|
||||
src="{{ $resource.RelPermalink }}"
|
||||
>
|
||||
{{ with .Get "href" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Get "caption" }}
|
||||
<figcaption>
|
||||
{{ . }}
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
|
||||
Reference in New Issue
Block a user