I’ve created a new page under /content
like so:
---
title: "Test page"
date: 2019-02-21T13:06:28Z
type: page
slug: "tester"
---
asdas
I am using the development server, when I try to access mysite.com/tester
I get a 404 not found. I’ve followed the docs to no avail, and also found a SO post that also doesn’t work: https://stackoverflow.com/questions/28569458/how-to-add-a-new-hugo-static-page
zwbetz
2
Since you’re using hugo server, the base URL will be localhost:1313
, not your production URL. So try hitting localhost:1313/tester
first.
When you run hugo server
, it will print the host/port at the bottom of the console output.
That stackoverflow question was asked in 2015, but be wary. Refer to the official docs for up-to-date info.
I left out the localhost bit, but yes that’s what I already do.
It has something to do with the theme. I have had this problem in the past. I’ll solve it don’t worry.
Got it. Forgot to modify the blank single.html
layout under _default
for the theme I am creating. Problem solved.