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/stream/list.html | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'layouts/stream') diff --git a/layouts/stream/list.html b/layouts/stream/list.html index 2fb46b4..7f3a92f 100644 --- a/layouts/stream/list.html +++ b/layouts/stream/list.html @@ -12,21 +12,17 @@

{{ .Date.Format "Monday, 2 January 2006" }}

-{{ $.Scratch.Set "toss" "toss" }}
{{ .Content }}
-{{ $.Scratch }} - -{{ if $paginator.HasPrev }} -

this page is paginated

- {{ $.Page.Scratch.Add "imgpath" "PAGINATED" }} -{{ else }} -

this page is NOT paginated

- {{ $.Page.Scratch.Set "imgpath" "img/" }} -{{ end }} - + + + + + + + {{ if .Params.tags }} -- cgit v1.2.3