/home/gimpf/on-topic

Improving basic pagination

The still-unsolved-problem, pagination: Hugo, like Jekyll, comes with an underdesigned paginator w.r.t. blogs. It’s a first world problem, but a problem nevertheless.

Immutability Heaven

Reasonable blogs only add articles at the most recent end of the timeline, so all old pages remain the same, minus errata and force majeur. Consequently, pagination of blogs should keep almost all old pages the same. Starting pagination from the newest page, and keeping ten (or any other number of) items per page, causes each new article to modify all pages. It will not only renumber all pages (bad enough) but even change every single page ever generated.

A blog is not a search engine. Adding a chapter at the end of a book does not renumber previous chapters. Neither should your blog pagination.

There are some resonable ways to do this, and for static websites the low-effort low-tech solution is to use a scheme similar to /before-2015-11, containing ten (or any other number of) items, then continuing to /before-2015-03 or similar.

Every page is a permalink now! It helps you when you send out links. The advantage is that any existing link keeps working, even in your IRC or browser history. And it will directly help your followers using Twitter or Google+, your friends and aquaintances on Facebook and WhatsApp, your family like your grand-ma via E-Mail, especially if they don’t give a shit about tech. Links are not an easy concept! It even improves Google’s search results, because the time between content-update and accurate search-results for older pages is zero, and zero is lower than any positive number.

Paging, Browsing, Searching

How is it that searching blog or newspaper articles in a browser usually takes more time than you feel it’s supposed to, why does it feel heavy? How would you feel if you had to use a dictionary, but you must start at either the beginning or the end, and then always turn only a single page?

You would burn that thing and search on Wikipedia. Via Google.

Most blog paginations (here I mean the UI, what you as user see as clickable links in your browser) allow you no more. Some allow you to fast forward by paging through five pages at once.

I rarely see simple pages allowing for a bisect.

Page    Link          Sane
  1     Start         2010-01
 20     <<<           2012-03
 40     Fast-Back     2015-08
 49     Previous      2015-12-31
 50       Here        2016-01-03
 51     Next          2016-01-03
 60     Fast-Forward  2016-04
275     >>>           2025-11
500     End           2084-08

This allows paging, fast-forwarding, starting from the front or the back. And it even allows for highly efficient binary search, like you would do in a real-paper dictionary. Still not as cool as the feel of paper under your thumb, but much better then even the default scrolling behavior of all (all!) mobile browsers.

I agree such a navigation scheme can still be tremendously improved. But like Chess and Go, sometimes you play the best move that you can come up with on the clock, and then work from there.