In an Eleventy site source:
├── page1
├── index.md
├── page2
├── index.md
or
├── page1.md
├── page2.md
Both directory structures should generate
├── page1
├── index.html
├── page2
├── index.html
What is the recommended approach?
Either way works, obviously.* Really whichever works best for your preferred organizational structure. I personally prefer to use your Choice 2 just to have one fewer layer of subdirectories, but both give you the same output.
Edit:
*I wrote that early in the morning and didn’t realize then that it might sound dismissive. I assure you I didn’t intend that, and apologize in case it created that impression.
My understanding is that this is preferable:
pages ├── page1.md ├── page2.md
The src doesn't have to match the result, and if it did it could get unwieldy with a lot of entries.
I like to have folders for each content, so that I can put additional files (images, files to download) alongside the Markdown file.
I chose this folders hierarchy so that permalinks are the same, without having to define a permalink attribute in templates.
Most helpful comment
I like to have folders for each content, so that I can put additional files (images, files to download) alongside the Markdown file.
Exemple:
https://github.com/nhoizey/nicolas-hoizey.com/tree/master/src/articles/2020/01/10/can-we-monitor-user-happiness-on-the-web-with-performance-tools
I chose this folders hierarchy so that permalinks are the same, without having to define a
permalinkattribute in templates.