Page successfully loads (No 404), but template not rendered

Hi there,

I’ve just started to look into Hugo and have decided to try and make a Minimum Viable Product with a list view.

I’ve followed the instructions on the list view documentation, however every time I render my _index.md template (localhost:1313/posts/), the page loads however with no content from the template (No preamble rendered).

I don’t get a 404 on the local development server, however a 404 does appear on the site which is deployed to Netlify (https://epic-minsky-af2d5b.netlify.app/posts/).

The code can be found here - GitHub - dookah/hugoTest: Test Repo

Page on localhost server

Hi,

As per your repo all content files including the Section _index.md are set as drafts.

Either undraft the files or use hugo -D as your Netlify command and hugo server -D for local development to build drafts.

Also as per the /layouts/_default/list.html template you are using the {{ define "main" }} declaration but there is no baseof.html template. Please have a look at the relevant doc:

1 Like

Thanks so much, baseof.html worked a trick. Very much appreciated.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.