blob: d7f7f9e7ce44196e859c43043c2df9c8345d2801 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.
|