I want to disable paginations on terms page. So in terms.html
, I changed {{ range .Paginator.Pages }}
to {{ range .Pages }}
.
And here is what i wrote on Pagination.
{{ if .Paginator }}
{{ if gt .Paginator.TotalPages 1 }}
......
{{ end }}
{{ end }}
But Hugo still generates pagination. The pagination keep existing, and I can even access http://localhost:1313/categories/page/2/
.
I’ve searched some articles on this. However, I still can’t solve this question. In this post, bep said,
Those pages only gets generated if you reference the
Paginator
in a template. So don’t and you should be home free.
But there isn’t anything related to pagination in terms.html
. Pagination still exists.
There is another case, just like what i’ve said, in this post: Turn off pagination - #3 by BYVoid