How to create more complex pagination?

It would be nice to have more control over pagination. As it is it’s pretty simple to create something like this:

[ < ] 1 of 10 [ > ]

<nav class="pagination" role="navigation">
    {{#if prev}}
        <a class="newer-posts" href="{{page_url prev}}">&larr; Newer Posts</a>
    {{/if}}
    <span class="page-number">Page {{page}} of {{pages}}</span>
    {{#if next}}
        <a class="older-posts" href="{{page_url next}}">Older Posts &rarr;</a>
    {{/if}}
</nav>

But what if we wanted to create something along these lines:

[ << ] [ < ] 1 2 3 4 … 97 98 99 100 [ > ] [ >> ]

This is a little more user friendly for blog with a large number of posts.

Thanks

Hey :wave:. You could achieve this with a bit of JavaScript. Using the {{pages}} value as a starting point you could iterate backwards from that number to create the additional page links. I could rustle up an example if you’re unsure :slightly_smiling_face: