hugo

Hugo new content not being added as page


I am creating a new hugo page named new-page by adding a new folder in the content folder:

+ content
+-- glossary
+-+ new-page
  +-- _index.en.md

But it does not appear in my site. When I request the page it simply returns a 404 Not Found HTTP status.

I added the header:

---
title: "New page"
date: 2050-01-27T10:00:00+01:00
type: "post"
weight: 996
---

Solution

  • Your new page's header defines a date in the future, hence the page is not added when site is built before that date.

    Make sure to add a past date if you want your page to be added to your site right away.

    Otherwise, you can use this "feature" to create some page in future builds of the documentation.