Pages in Content are not published

Hi everyone,

I had my personal simple website up and running for a few months. When starting to use my new laptop, I noticed some errors when building the website, and decided to do it from scratch.

I am going nuts at the moment though, because whenever I create a markdown page under the “content” folder, the link in the homepage that is supposed to redirect towards it leads to a 404 error page. The same does not happen if I declare a type (e.g., “blog”), which I do not want to do. I only want a simple markdown page.

Here the link to the repository:

https://github.com/janmazza/website_test

Any help would be greatly appreciated!

Jan

At least your baseURL is broken – use your real URL, ie the one you want to publish the site at.

  • When you run hugo server, Hugo will automagically use http://localhost:1313
  • When you run hugo (ie without `server*), Hugo will use the baseURL you set.

From your post, it’s not clear when you’re experiencing the problems: in development (hugo server) or deployment (hugo).

Also: You do not want to include public in your Github repo. Same for your node_modules and resources.

The theme you are using is a bit broken.

This layout defines a main section to go in to a baseof.html template but none exist.

All other templates are built in the old way with all the code in each template.

Plus all of @chrillek points above.

Test to paste the content of adritian-free-hugo-theme/layouts/blog/single.html at main · zetxek/adritian-free-hugo-theme · GitHub in to adritian-free-hugo-theme/layouts/_default/single.html at main · zetxek/adritian-free-hugo-theme · GitHub and the pages should appear.

1 Like

Thank you very much. Indeed they now appear - although following the structure of the blog post (“Published on…”, “continue reading”…). But I guess I’d be able to remove everything beside what I need.

Thank you for your help. I experience it when I run hugo server, but another user correctly flagged that the problem lies in the theme layouts.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.