Skip to content

Term page with build options not handled correctory #12058

@jmooring

Description

@jmooring

This is essentially the same as #12055, but with build options instead of the draft flag.

This test (the file content part) fails:

func TestFoo(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 := hugolib.Test(t, files)

	b.AssertFileContent("public/index.html", "|0|")
	b.AssertFileExists("public/tags/a/index.html", false)
}

To me, these should be equivalent:

content/tags/tag-a/_index.md

+++
title = 'My Tag A'
draft = true
+++
+++
title = 'My Tag A'
[build]
render = 'never'
list = 'never'
+++

In both cases (a) the page should not be published, and (b) the term should not be a member of the "tags" taxonomy object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions