nodede
May 21, 2018, 10:21am
1
I uploaded a minimal example here:
I followed this tutorial closely: http://gohugo.io/content-management/types/#define-a-content-type (except for the part where ‘title = My First Event’ had to be 'title = “My First Event” ') and created two files:
content/events/my-fist-event.md
layouts/event/birthday.html
Everything works perfectly. But now I try adding
content/events/index.html
index.html renders but my-first-event for some reason stops rendering! Why does this happen?
Thanks!
I think that this is because including an index.html
turns the folder into a page bundle. If you want the other pages in the folder to be rendered, I think you need to have _index.html
instead which turns the folder into a section.
maiki
May 21, 2018, 6:46pm
3
What are you putting an HTML template in the events section? As in, what’s your goal?
Hugo is a fast moving project, so I could be wrong, but I don’t think there is a reason to put an HTML file in your content
directory.
Are you perhaps thinking of index.md
/_index.md
? If you need to customize that section, you should read about page bundles .
Yeah, I somehow missed the _index / index distinction. Thanks so much!