How do you create a new page?

Not using a theme.

Homepage in layouts > index.html
New page I want in content > page >
I expect to visit localhost:1313/page/living to view the page, but getting 404

File Structure:


Edit: I added empty file layouts > _dafault.single.html file to try to solve. Still no luck.

Your layouts cannot be empty, as they are how Hugo works to merge content markdown with HTML and the needed css. I recommend using a theme at first until you can see how things work. Then, you can use your own layouts instead.

1 Like

I believe you have your default single.html file set up incorrectly.

Instead of having a file called _default.single.html create a folder called _default with a single.html file inside.

  • layouts
    • _default
      • single.html
1 Like