How to suppress section page for a specific content type?

I have a site with content/page/ containing regular pages as individual .md files, and content/post/ containing blog posts. I want Hugo to generate a list page for the posts (/post) but not for pages (/page.

  • I can disable section pages completely with disableKinds: ["section"] in the config, but then I don’t get /post generated.

  • I tried creating content/page/index.md and adding headless: true in it, but then none of the pages get generated. Indeed the very existence of content/page/index.md suppresses generation of any other pages in that bundle (which I think is what the documentation says it should do.)

  • Creating content/page/_index.md does nothing, even with headless: true in it.

  • I thought I could customise the layout and content of /page using a template in layouts/page/list.html but a) I don’t want a customised output for that, I want it to not exist, and b) if I do create that file it gets used for the home page instead of layouts/index.html. What gives there?

Any suggestions on what else to try?

And here is an abbreviated directory tree:

.
|-- archetypes
|   `-- default.md
|-- assets
|   |-- css
|   |   `-- style.css
|   |-- js
|   |   |-- cart.js
|   |   |-- datepicker.js
|   |   |-- forms.js
|   |   `-- script.js
|   `-- scss
|       |-- datepicker.scss
|       `-- kh.scss
|-- config.yaml
|-- content
|   |-- 404.md
|   |-- _index.md
|   |-- page
|   |   |-- _index.md
|   |   |-- about-us.md
|   |   `-- who-we-are.md
|   |-- post
|   |   |-- 10969.md
|   |   |-- feeling-warm-and-fuzzy.md
|   |   `-- work-experience.md
|-- data
|   |-- buttons.json
|   `-- menu.json
|-- layouts
|   |-- _default
|   |   |-- baseof.html
|   |   |-- index.json
|   |   |-- list.html
|   |   `-- single.html
|   |-- home
|   |   |-- list.html
|   |   `-- single.html
|   |-- index.html
|   |-- index.json
|   |-- page
|   |   `-- single.html
|   |-- partials
|   |   |-- button.html
|   |   `-- carousel.html
|   |-- post
|   |   `-- list.html
|   `-- shortcodes
|       `-- class.html

Have a look at Build Options.

Thanks, that seems to be the answer.