From b970808bccebdbd102ef5f2337c74f3c2f99d1e9 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 23 Oct 2023 15:05:16 +0100 Subject: Pagination of stream complete with working images To include an image in the stream, you have to use the streamimage shortcode, e.g. {{< streamimage filename="bobbins.jpg" >}} bobbins.jpg must be saved in content/stream/img. You can include a "size" param in the shortcode (a string as number), which is translated as a height attribute in the img html tag. --- layouts/shortcodes/streamimage.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/streamimage.html b/layouts/shortcodes/streamimage.html index 2ff9f0a..003b982 100644 --- a/layouts/shortcodes/streamimage.html +++ b/layouts/shortcodes/streamimage.html @@ -1,5 +1,3 @@ {{ $filename := .Get "filename" }} - - -

{{ .Scratch.Get "toss" }}

- +{{ $size := .Get "size" }} + -- cgit v1.2.3