Pagination for findTaxonomy() results

I’m using findTaxonomy() to show a collection based on a URI param (otherwise I’d use the page’s frontmatter). It’s working great except I can’t seem to find a way to get pagination working to limit the results. Is this possible? Is there another recommended way to handle cases like this?

Sample code:

{% set urlCategory = grav.uri.param('category') %}
{% set articlesInCategory = taxonomy.findTaxonomy({
    category: ('category.' ~ urlCategory)|t
}).order('default', 'asc') %}
---

As a “dirty fix” I have sometimes just done a manual pagination, like this:

{% if uri.param('page') %}
	{% set index = uri.param('page') %}
{% else %}
	{% set index = 1 %}
	{% set start = 0 %}
	{% set stop = 5 %}
{% endif %}

{% if uri.param('page') %}
	{% set start = index * 5 - 5 %}
	{% set stop = index * 5 %}
{% endif %}

{% set index_len = page.children|length / 5 %}
{% set index_len = index_len|round(0, 'ceil') %}

It is based on a URI parameter, page being set - indicating what “page” of the pagination is shown, each page containing 5 items.

Thus start defines the start of the array (numerically) and stop the end of it. You can use these with Twig’s slice() to produce the desired result.