From fa520a2d983b982394ad10088393fb303e48980a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 19 Feb 2020 09:16:27 +0100 Subject: [PATCH] Add Page.GetTerms Fixes #6905 --- .../en/templates/taxonomy-templates.md | 12 +++++++ hugolib/content_map_page.go | 2 +- hugolib/page.go | 28 ++++++++++++++++ hugolib/site_benchmark_new_test.go | 10 ++---- hugolib/taxonomy_test.go | 33 +++++++++++++++---- resources/page/page.go | 4 +++ resources/page/page_nop.go | 4 +++ resources/page/testhelpers_test.go | 4 +++ 8 files changed, 82 insertions(+), 15 deletions(-) diff --git a/docs/content/en/templates/taxonomy-templates.md b/docs/content/en/templates/taxonomy-templates.md index b82a5175c..bef2d3226 100644 --- a/docs/content/en/templates/taxonomy-templates.md +++ b/docs/content/en/templates/taxonomy-templates.md @@ -216,6 +216,18 @@ Because we are leveraging the front matter system to define taxonomies for conte ### Example: List Tags in a Single Page Template +{{< new-in "0.65.0" >}} + +```go-html-template + +``` + +Before Hugo 0.65.0 you needed to do something like this: + ```go-html-template {{ $taxo := "tags" }}