Where to write templates for csv format

I have this warning:

WARN 2023/05/02 17:46:13 found no layout file for “CSV” for kind “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

I want to create a csv file with things inside. I tried with single.csv, baseof.csv, with upper cases too, it’s not seen. and the rules do not mention any case except AMP, html and rss

[outputs]
  page = ['HTML', 'CSV']

[outputFormats.HTML]
isPlainText = true

[permalinks]
docs = '/en/:slugorfilename/'
languageName = 'English'
contentDir = 'content'
weight = 1

In which directory?

Ah ! Found the winning combination:
/themes/hugo-book/layouts/_default/single.csv
But the question is… why ? Why not baseof.csv ?
While I understand the template specific for section page and home files, and per type/layout, I don’t understand what those list or post template are here for either, there’s not much info on the site.

Because baseof is the root of the base/block system. You need both baseof plus a single or list template, both of the same content type.

But of the csv content type there’s no baseof, yet it seems to work (haven’t finalized the source collection I want, but it does read the template at least) ?

If you provide a baseof, you need to also provide a single or list template.

The inverse is not true.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.