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 b4e32e1 commit f517214Copy full SHA for f517214
layouts/shortcodes/figure.html
@@ -10,6 +10,8 @@
10
{{ $alt := .Get "alt" }}
11
{{ $caption := .Get "caption" }}
12
13
+{{ $Page := .Page }}
14
+
15
{{- $responsiveImages := (.Page.Params.responsiveImages | default site.Params.responsiveImages) | default true }}
16
17
<figure{{ if or (.Get "class") (eq (.Get "align") "center") }} class="
@@ -30,7 +32,7 @@
30
32
{{- range $imageType := $imageTypes -}}
31
33
<source type="image/{{ $imageType }}" srcset="
34
{{- $compressedImage := printf "%s_1080x.%s" $src $imageType -}}
- {{- $cmSrc := $.Page.Resources.GetMatch $compressedImage -}}
35
+ {{- $cmSrc := $Page.Resources.GetMatch $compressedImage -}}
36
{{- if $cmSrc -}}
37
{{ $cmSrc.RelPermalink | absURL}} 1080w
38
{{- else -}}
0 commit comments