diff --git a/README.md b/README.md index 42826349..b10797e2 100644 --- a/README.md +++ b/README.md @@ -532,6 +532,7 @@ The `paige/image` shortcode provides an image. sizes="" src="" srcset="" + style="" title="" width="" >}} ``` @@ -571,6 +572,8 @@ Parameters:
Required. Position 0. String. URL. Image source.
srcset
Optional. String. Image srcset. Must not be set with breakpoints or densities.
+
style
+
Optional. String. CSS. Image style. Merged with implementation.
title
Optional. String. Plain text. Image title.
width
diff --git a/layouts/shortcodes/paige/image.html b/layouts/shortcodes/paige/image.html index 71e4f2da..96a33784 100644 --- a/layouts/shortcodes/paige/image.html +++ b/layouts/shortcodes/paige/image.html @@ -13,6 +13,7 @@ {{ $sizes := .Get "sizes" }} {{ $src := .Get 0 | default (.Get "src") }} {{ $srcset := .Get "srcset" }} +{{ $style := .Get "style" }} {{ $title := .Get "title" }} {{ $width := .Get "width" }} @@ -32,6 +33,7 @@ "sizes" $sizes "src" $src "srcset" $srcset + "style" $style "title" $title "width" $width ) }}