🛠 fix: Syntax error

This commit is contained in:
Tomy Hsieh
2023-05-27 05:37:02 +08:00
parent 88c73a3aae
commit 0d4fe03a45
5 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -1,13 +1,14 @@
{{ $url := urls.Parse .Destination }}
{{ $altText := .Text }}
{{ $caption := .Title }}
{{ $lazyLoad := $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ if findRE "^https?" $url.Scheme }}
<figure>
<img
class="mx-auto my-0 rounded-md"
src="{{ $url.String }}"
alt="{{ $altText }}"
{{ if .Site.Params.enableImageLazyLoading | default true }}
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>
@@ -39,7 +40,7 @@
{{ end }}
{{ end }}
alt="{{ $altText }}"
{{ if .Site.Params.enableImageLazyLoading | default true }}
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>
@@ -51,7 +52,7 @@
class="mx-auto my-0 rounded-md"
src="{{ $url.String }}"
alt="{{ $altText }}"
{{ if .Site.Params.enableImageLazyLoading | default true }}
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>