tpl: Add a terse pagination template variant to improve performance
authorJoe Mooring <joe.mooring@veriphor.com>
Tue, 8 Jun 2021 08:41:21 +0000 (01:41 -0700)
committerGitHub <noreply@github.com>
Tue, 8 Jun 2021 08:41:21 +0000 (10:41 +0200)
commit73483d0f9eb46838d41640f88cc05c1d16811dc5
tree0c0bd410f7c4ea98f264076fe5cd3d0e50b3f750
parent9b5debe4b820132759cfdf7bff7fe9c1ad0a6bb1
tpl: Add a terse pagination template variant to improve performance

These calls are equivalent:

{{ template "_internal/pagination.html" . }}
{{ template "_internal/pagination.html" (dict "page" .) }}
{{ template "_internal/pagination.html" (dict "page" . "format" "default") }}

To use an alternate format:

{{ template "_internal/pagination.html" (dict "page" . "format" "terse") }}

Fixes #8599
hugolib/embedded_templates_test.go
tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/pagination.html