We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c64bb4 commit 437c849Copy full SHA for 437c849
web/layouts/shortcodes/figure.html
@@ -1,8 +1,13 @@
1
+{{ $src := .Get "src" }}
2
+{{ with .Page.Resources.GetMatch $src }}
3
+ {{ $src = .Permalink }}
4
+{{ end }}
5
+
6
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
7
{{- if .Get "link" -}}
8
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
9
{{- end -}}
- <img src="{{ .Get "src" }}"
10
+ <img src="{{ $src }}"
11
{{- if or (.Get "alt") (.Get "caption") }}
12
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
13
0 commit comments