Blaugust, eleventy, websites
Quick and dirty one, today, because it has Been A Monday, but I'm pleased to report that I finally read the eleventy docs for paginating an index, and understood them! As with a lot of their docs, it took me a couple tries. Tech writing is a hugely under-valued skill in the world. The right combination of enough words to be clear, and not too many to lose your reader, and solid examples, is priceless.
In this case, the problem was the description of the pagination data structure, which looked like explicit javascript that had to be used in order to set those values, instead of just hints about how to use the object we were provided in the data cascade by eleventy. The sentence "We then provide you with helpful data in an object named pagination
." is never used, it's just "here's some javascript describing an object!"
Actually doing the thing turns out to be very easy, at least. You put a little note in your front matter that here's the object you want to iterate on, whether you'd like it to go forwards or backwards, and how many items per page, and it just... does it. Whew. I'm as relieved as I was when I got the tag system working!
Next up: a favicon, 'cuz I'm tired of a Sad Lonely "P".
edit: Note: no one will see anything exciting, because I set it to paginate at 20 posts, and I don't have 20 posts yet, but when I do, whooo, it's gonna paginate the heck out of it!