Have `hugo new content` create subfolder?

Hello,

I have a pretty simple personal website with post and project pages. I’m trying to add archetypes because that feels “right” and I’d like to have hugo new content work properly. I’ve gotten a basic page archetype to work and it creates a new file as content/page/TITLE.md.

I’d prefer to have it create content/page/TITLE/_index.md so it’s easier to organize images and other files associated with the post (or project).

Can I do that (easily)?

My site source code is at GitHub - dkozel/dkozel.github.io

Thanks!

Not sure I understand. All of these will create the pages you expect:

hugo new content posts/post-1.md
hugo new content posts/post-1/index.md  <--creates a leaf bundle
hugo new content posts/_index.md  <-- creates a branch bundle (section page)

The documentation includes a section about archetypes for leaf bundles. See:
https://gohugo.io/content-management/archetypes/#leaf-bundles