Beating my head on this wall way too long. If I use content/_index.md my pages in subdirectories all work just fine, but the home page is a list of blog posts. If I use content/index.md my home page works but all other pages linked on the menu are 404.
I have tried changing the content of theme/hugo-casper-two/layouts/index.html but this does not seem to change anything.
My content structure is like this, mainly due to a couple of shortcuts I’m using:
Using content/index.md means that Hugo interprets your page as a Leaf Bundle. This means that all other page-type content under it are treated as Page Resources, which in this case would have no Permalinks.
Ok, thanks. I think I understand that a bit better now, but how do I tell Hugo to stop using a list of blog posts for the home page? It is defaulting to that, even with no index.md in /content/, and I can’t find where the theme specifies it…
The index.html in your theme is named Index.html, note the capital I. Hugo does not recognise this, so then moves down the list as per the layout lookup rules I linked to above, to find the next available layout file, and uses instead _default/list.html.
Rename Index.html to index.html with small letter i so Hugo recognises and uses that layout.
So I renamed the file to _index.md and modified theme/themename/layouts/index.html by commenting out the post-list partial and inserting a {{ .Content }} section.
It worked! Fugly, but functional. It’s all cleanup and css from here.
I am closing this topic as this question has been marked as solved. If the solution here does not work for you, please open a new topic. Have a read about Requesting Help to see how to ask for help, and please note the section on showing us your code. Screenshots are not really helpful.