switch p.Kind() {
case kinds.KindTerm:
+ if !p.m.shouldList(true) {
+ return false, nil
+ }
taxonomy := m.s.taxonomies[viewName.plural]
if taxonomy == nil {
return true, fmt.Errorf("missing taxonomy: %s", viewName.plural)
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|")
+}