diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-02-18 15:57:37 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-02-18 16:50:35 +0100 |
commit | 5ada27bf65935b030c84a7cc1257c66f8eedfd84 (patch) | |
tree | 0d3855223fdb21bfbee1e41cc2b343dc382745fc /hugolib/taxonomy_test.go | |
parent | 60b176cb574c9db2361f8eb7e0d957099c9d6e19 (diff) |
Fix handling of build options for term pages
Fixes #12058
Diffstat (limited to 'hugolib/taxonomy_test.go')
-rw-r--r-- | hugolib/taxonomy_test.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go index 8c29b781e..629db185a 100644 --- a/hugolib/taxonomy_test.go +++ b/hugolib/taxonomy_test.go @@ -858,3 +858,30 @@ draft: true b.AssertFileExists("public/tags/a/index.html", false) } + +func TestTermBuildNeverRenderNorList(t *testing.T) { + t.Parallel() + + files := ` +-- layouts/index.html -- +|{{ len site.Taxonomies.tags }}| +-- content/p1.md -- +--- +title: p1 +tags: [a] +--- +-- content/tags/a/_index.md -- +--- +title: tag-a-title-override +build: + render: never + list: never +--- + + ` + + b := Test(t, files) + + b.AssertFileExists("public/tags/a/index.html", false) + b.AssertFileContent("public/index.html", "|0|") +} |