I've found this nice jekyll theme: http://www.jacoporabolini.com/emerald/ with good looking pagination. Unfortunately is only good looking when there is a small number of pages. In case of my blog this looks like this:
Not surprisingly because the code looks like this:
{% for page in (1..paginator.total_pages) %}
And it should like more like this:
{% for page in (min(1,paginator.page-3)..max(paginator.page+3,paginator.total_pages)) %}
The problem is, I don't think there is something like min
and max
in Liquid or even arithmetic operators like +
or -
. I was searching though the documentation and couldn't find min
or max.
I've also checked many themes and all they offer is this naive pagination, no pagination at all and first|current|next type of pagination. Any hints are appreciated.