Template for sub content paths

If I have the following directory structure:

content
└── path
    └── to
        └── something.md

then which template is called if I visit the path/to/ URL?

This should be documented fairly well There is (currently) nothing special “sub content paths”.

Yes I know, I just didn’t know what should be the title.

Anyway if this is documented then I misunderstood something again. So my first thought was that the path/to page should be a listing page but this is not a taxonomy, not a section and not the index page and if I understood correctly there are no other kind of list. Furthermore I have no specific list templates, the only one is the default template in the _default directory. And that template contains something, so I should see something at least if that would be called but I always get empty white screen with no content at all. I have checked the response with Chrome’s developer tool and it only contains the <pre></pre> tags, and that’s all.

My second thought was that the page (path/to) is a simple content page, so I have created a path/single.html file but that doesn’t work either. I also have _default/single.html but that is not the one which is rendered.

something.md is a single page in the section named to.

Well that is weird, because if create a template for the to section (layouts/section/to.html), still nothing happens. And the _index.md file in path/to/_index.md doesn’t work either. It only works at the “top level” sections. So if both path and to are sections then the _index.md and the section related template only works for path.

Only “to” is section.

And you really need to read the documentation like the Devil reads the bible:

1 Like

Could you please give an example? I think I misunderstand something again and again when I read the documentation. Here the doc says that sections are the top level directories. That is fine, but how to could be a section if that is not on the top level? So I would like to create a template for the http://localhost:1313/path/to page, and not for http://localhost:1313/path or http://localhost:1313/path/to/something.

OK, I was wrong about the section … The section is of course the first directory below /content, so in your example it is “path”. Which, I guess, only underlines the importance of reading the doc carefully.