diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2024-04-11 12:42:57 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-04-12 16:26:02 +0200 |
commit | a6e84391760ca3786bf580344e2a013ac54b4b4a (patch) | |
tree | 02a71d632c865818412a03b8b67eb1bab7574107 /resources/page/taxonomy_integration_test.go | |
parent | 38f68cd16282f7fe570c3800986da3651c4b195e (diff) |
resources/page: Add taxonomies Page method
Closes #12316
Diffstat (limited to 'resources/page/taxonomy_integration_test.go')
-rw-r--r-- | resources/page/taxonomy_integration_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/resources/page/taxonomy_integration_test.go b/resources/page/taxonomy_integration_test.go index a028857cb..70e204dd1 100644 --- a/resources/page/taxonomy_integration_test.go +++ b/resources/page/taxonomy_integration_test.go @@ -53,3 +53,29 @@ authors: [John Smith] "Robert Jones count: 1", ) } + +func TestTaxonomiesPage(t *testing.T) { + t.Parallel() + + files := ` +-- hugo.toml -- +disableKinds = ['rss','section','sitemap'] +[taxonomies] +tag = 'tags' +category = 'categories' +-- content/p1.md -- +--- +title: p1 +tags: [tag-a] +--- +-- layouts/_default/list.html -- +{{- with site.Taxonomies.tags.Page }}{{ .RelPermalink }}{{ end }}| +{{- with site.Taxonomies.categories.Page }}{{ .RelPermalink }}{{ end }}| +-- layouts/_default/single.html -- +{{ .Title }} +` + + b := hugolib.Test(t, files) + + b.AssertFileContent("public/index.html", "/tags/||") +} |