Rendering other sections than "post"?

Ahoi!

I’m looking for a way to render multiple sections.
If I run hugo new post/some_post.md it will be rendered, but when I add hugo new some_section/some_post.md it won’t.

I’m sure there must be a simple way to add new sections, but I’m realy stuck here (kind of embarassing - but tried everything that came to my mind and loooked and googled for it all day…).

Hey @aik, do you have a layout file for some_section?

1 Like

Hey @farazfazli - ty for fast reply =)

No – but I neigther have for “post”.
Is it a matter of just having some file in /layouts/some_section.html?
Is there a simple example how such file has to be populated?

Yup, see https://gohugo.io/content/sections/

I was on that page very often - still don’t get it :frowning:
It seems as if you could just create xyz.md and subfolders of content are treated as sections automaticly (using /layouts/_default/list.html [??])?
I copyed that file to /layouts/section/aud.html - no difference…

And: How’s content in /content/post/ rendered then? There’s no special file for it in /layouts… or anywere else as far as I can tell.

4 posts were split to a new topic: How to render contents of section _index.md and child pages