From e111d4f47d0f15dce442e99203bf3cc813592657 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 23 Oct 2023 15:21:42 +0100 Subject: New stream --- content/stream/2023-10-23.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 content/stream/2023-10-23.md diff --git a/content/stream/2023-10-23.md b/content/stream/2023-10-23.md new file mode 100644 index 0000000..d7f7f9e --- /dev/null +++ b/content/stream/2023-10-23.md @@ -0,0 +1,16 @@ +--- +title: "2023 10 23" +date: 2023-10-23T15:14:10+01:00 +draft: false +tags: ["hugo"] +--- + +Have implemented [pagination](https://gohugo.io/templates/pagination/) on this stream. See the really modern looking navigation links at the foot of the page. It's functional and does the job. + +It all got very confusing when trying to ensure that the relative links worked - I got confused by each post being a page or not; it transpires of course that the stream does not descend into each individual page (in Hugo terms) - it's just a list. + +This got me into quite a lot of trouble with [.Scratch](https://gohugo.io/functions/scratch/) which I never got to work on the list content type and [writing my own shortcode](https://gohugo.io/templates/shortcode-templates/), which I eventually did to implement stream images. + +Fell back to using absolute links in the shortcode, which is fine, but I was trying to get fancy, detecting whether the page we were on was paginated or not and setting a relative link accordingly. + +Reassuringly, very few people will have any inkling about what I'm talking about - neither will I in a few days. -- cgit v1.2.3