summaryrefslogtreecommitdiffstats
path: root/hugolib/site_benchmark_new_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 09:16:27 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-19 14:52:23 +0100
commitfa520a2d983b982394ad10088393fb303e48980a (patch)
treef545a33ef8de2eccc6fe781281126a5daf90a4c0 /hugolib/site_benchmark_new_test.go
parent82029c1ec975bc2173bd5a454aee6c800924035d (diff)
Add Page.GetTerms
Fixes #6905
Diffstat (limited to 'hugolib/site_benchmark_new_test.go')
-rw-r--r--hugolib/site_benchmark_new_test.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/hugolib/site_benchmark_new_test.go b/hugolib/site_benchmark_new_test.go
index 4ffeaa8a1..1f16c97e5 100644
--- a/hugolib/site_benchmark_new_test.go
+++ b/hugolib/site_benchmark_new_test.go
@@ -378,14 +378,10 @@ contentDir="content/sv"
{"List terms", func(b testing.TB) *sitesBuilder {
pageTemplateTemplate := `
-{{ $taxo := "categories" }}
<ul>
- {{ range .Param $taxo }}
- {{ $name := . }}
- {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
- <li><a href="{{ .Permalink }}">{{ $name }}</a></li>
- {{ end }}
- {{ end }}
+ {{ range (.GetTerms "categories") }}
+ <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
</ul>
`