I’ve been struggling to get this super simple thing to work. I’m not sure if there’s a bug in my version of Hugo or if I’m doing something very wrong.
Basically, I want my website to be accessible by: http://URL, and this gives me the home page — this much is working, index.md is being used. However, whenever I try to implement other pages, like http://URL/projects, the markdown file is not parsed and not put inside the public folder.
Inside the public folder, I have index.html, but nothing for the other two. Their headers follow this pattern:
---
author: Name Here
title: Projects
type: static
---
I also tried changing the type to single, and many other values, without success.
Disclaimer: I’ve read basically all related material online, including topics here about rendering multiple root level html pages, without success. None worked.
Version: Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown
Hi. You need to change content/index.md to _index.md. This will convert that directory level from a leaf bundle to a branch bundle, and allow your other pages to display
Thanks for the quick reply!
I’ve tried doing this, but then when compiling I get this: Error: Error building site: failed to render pages: render of "home" failed: "/PATH/site/themes/bootstrap/layouts/static/list.html:7:31": execute of template failed: template: static/list.html:7:31: executing "static/list.html" at <.Paginator.Pages>: undefined variable: $index
If I change the type inside _index.md to single (it was static before), it works for all the pages, except index itself (home is inaccessible, there is an index.xml inside public, but no index.html).