How to perform pagination under taxonomy.html?

I found the solution after following this past discussion.

Turns out, you need to explicitly declare the pagination in the range syntax like below:

{{ range (.Paginate .Data.Pages).Pages }}
{{ . }}
{{ end }}

I’m not sure about the the reason behind this. Is it because the variable make the paginator object static?