diff options
-rw-r--r-- | content/stream/2023-10-23.md | 16 |
1 files changed, 16 insertions, 0 deletions
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. |