]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
tpl/tplimpl: Add img loading attribute to figure shortcode (#10927)
authorInLaw <marsweb@gmx.de>
Sun, 21 May 2023 19:28:45 +0000 (21:28 +0200)
committerGitHub <noreply@github.com>
Sun, 21 May 2023 19:28:45 +0000 (12:28 -0700)
docs/content/en/content-management/shortcodes.md
tpl/tplimpl/embedded/templates/shortcodes/figure.html

index 6344446842fedf973f3e13dc9175af7cd3880719..a9269c2162ba7e2eb42b3ab9d9faf0e32f1f3e60 100644 (file)
@@ -117,6 +117,9 @@ height
 width
 : `width` attribute of the image.
 
+loading
+: `loading` attribute of the image.
+
 attr
 : Image attribution text. Markdown within the value of `attr` will be rendered.
 
index ecabb286e35a8e0cf8907679388056739301d90f..afe784c19c6eaa7b54668705b939a2e5a16771c8 100644 (file)
@@ -8,6 +8,7 @@
          {{- end -}}
          {{- with .Get "width" }} width="{{ . }}"{{ end -}}
          {{- with .Get "height" }} height="{{ . }}"{{ end -}}
+         {{- with .Get "loading" }} loading="{{ . }}"{{ end -}}
     /><!-- Closing img tag -->
     {{- if .Get "link" }}</a>{{ end -}}
     {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}