[Solved] Page not found

Hi !

I’m new with Hugo and I don’t have a lot of skills in dev but I like to learn and simple things. So I started using Hugo instead of Wordpress and I’m glad of it to build a simple page with a nice theme. All works nice !

Unfortunately, now I want to add a new page and I don’t have any result :’(

I saw in the manuel, that I have to do this : hugo new content/test.md
Then I pull some content inside and I change draft: true to false and run hugo

There I don’t have any new page in public directory, neither public/content too. I search during two hours on Internet but nobody seems to have this problem so I don’t know where is the mistake.

Anybody can help me please ?

Hello @NPL,

your initial steps sound correct. A common mistake is that people forget to set a theme that’s used to render your content by setting theme = "xyz" in the config file or by starting Hugo with hugo server -t xyz.

But without the source files of your website it will be hard to track the issue. Would it be possible to upload your Hugo site?

Just send you the code in private message. Thanks for your help

The original agency theme was was only a single-page theme meaning that only the homepage was the only page of the website. I ported the theme as it was and didn’t included a template for single pages that you created.

Hence will not see any content file rendered. However, there is an open pull request on GitHub (work in progress) that adds such abilities to the theme which already works fine

I don’t know how familiar you’re with Git and GitHub. Hence you might or might not be able to get the theme working with this additions.

As you can read in the bottom of the discussion around the pull request we agreed that backwards-compatible additions (like the single pages) will be added in the future. The contributor started to rebuild this theme with Bootstrap 4 (a popular framework to create website layouts) that will also include further additions.

Thanks for your help. I didn’t think a theme can block new pages so I could search during a while !

I will look the Syna theme you are talking about because it seems nice and moreover because I don’t know how to merge the additions. Like it have most the structure I wanted, it sounds good for my needs : http://controller-christine-21401.netlify.com/ so I will try it.

Thanks !

Hugo isn’t really blocking new pages. Hugo just don’t know how to render this pages because the necessary templates don’t exist.

1 Like