The second one is correct; _index.md > list page > use list.html
content/gallery/index.md is a single page, but it is a top-level single page. It is basically equivalent to content/gallery.md. As such, it is not under a section; it has no .Section.
It will use _default/single.html unless a more specific layout is defined.
layouts/gallery/single.html would apply to pages like
content/gallery/index.md is a single page, but it is a top-level single page. It is basically equivalent to content/gallery.md . As such, it is not under a section; it has no .Section .
It will use _default/single.html unless a more specific layout is defined.
layouts/gallery/single.html would apply to pages like
What would a more specific layout look like? I tried different paths like layouts/gallery.html, layouts/_default/gallery.html to no avail.
Basically, what I’m asking is: can my gallery be an index.md and have its own template? Or does it have to be a list-type template by virtue of its use? That’s the part I have a hard time understanding. For me it’s a single page, since it won’t have any *.md siblings.
Edit
I’m making some progress. If I define layout: gallery in the frontmatter of /content/gallery/index.md, it picks up layouts/_default/gallery.html (not layouts/gallery.html though). Will the lookup rules prevent anygallery.html from taking precedence over _default/single.html without adding such a hint?