Hi, I’ve put Hugo on! However, when I go to /example or /example.html now this comes up:
404 page not found
although the .html file is in the / layouts folder!
Hi, I’ve put Hugo on! However, when I go to /example or /example.html now this comes up:
404 page not found
although the .html file is in the / layouts folder!
It sounds like you’ve placed content in the layouts folder; that isn’t going to work.
It would be easier to help you if you were to share your code. See:
https://discourse.gohugo.io/t/requesting-help/9132
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick
git clone
on your repo, then runhugo server
in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
I wanted to do it like Azuriom…
I’m not sure how that helps either of us… see my previous response.
Well, Azuriom also has .html files in the / page directory of layouts…
So, I tried it out a little! Now comes this hint:
WARN 2021/09/30 18:53:41 found no layout file for “HTML” for layout “about-us” for kind “page”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
So, I solved it! Just had to create the about.md file in /content:
---
layout: about-us
---