Hugo-coder 404's at random

By now I have no idea of what am I doing wrong. I recently started building a bilingual website in hugo-coder, after writing a bunch of posts time came to proof-read them on the pre-built website, I found out that most of the time clicking on “Blog” (it should open posts/, a list of posts in content/posts/) would end up with 404, not even the one from the theme, just:
<html><head><link rel="stylesheet" href="resource://content-accessible/plaintext.css"></head><body><pre>404 page not found </pre></body></html>
even when there are markdown files in content/posts/ in both languages. Previously my main method of fixing problems was to erase all _gen folders made by hugo during builds, but now, after checking that every file mimics examples from theme’s author and seeing it working with unchanged post files once or twice, I have no idea why it keeps loosing track of the posts and it’s infuriating, since before this I was minutes away from publishing and it’s infuriating.

  1. Post a link to your repo
  2. Explain your issue better. It is not clear to me if the 404 comes up on your “live” server or when you run hugo server.
  3. deleting the _gen folder for 404 issues does not solve the issue. That folder is about asset processing. You might have deleted more than you should have.

The HTML you posted is not from Hugo, so you probably either don’t have the server running or loading a page where the server does not serve.

Fortunately we use computers, so you should be able to reproduce in a different repo. :slight_smile:

Given you can’t share anything, you are on your own. When I’m on my own, I start at the basics, and build up from there. So reduce your config parameters to the essentials, build the site, see what breaks, fix it, repeat. Good luck! :slight_smile:

what config parameters? there is literally nothing besides markdown pages on a rather popular theme on a clean installation of hugo. No dumps, error messages, nothing to be worried about, yet each build is like a roulette

All I can say is please read your message and pretend someone else wrote it: how would you answer? What can I suggest? Start completely over? Without seeing something, that’s my suggestion.

I apologize, I misspoke. Please ignore my replies.

Like @davidsneighbour and @maiki mentioned: since you cannot share a link to your repo, then create a minimal reproducible example and share that with us. If you cannot do this, then we cannot help you.

what’s there to share?

  • create new site with hugo-coder
  • replace projects page with projects folder and a bunch of posts in it
  • 404s come at random, serve or not

Give this a read: https://stackoverflow.com/help/minimal-reproducible-example

Hugo works. The Hugo-coder theme works. I just tested this myself, and I am not getting “random 404s”.

Therefore something you are doing is what is making something “not work”. We don’t know what that is you are doing that is making things not work. We have no way of knowing, because we don’t know what your code looks like.

We are asking you to make it easier to help you.

You cannot show your full project? Fine. Create a minimal reproducible example instead.

This means, create a sample project, with dummy lorem ipsum content, that you can share to the public, that shows your problem.

If you do not wish to do this, we are unable to help you, because Hugo works, and the theme works, and we don’t know what you are doing that makes things not work.

No one is going to spend who knows how many hours trying to come up with a non-working example for you. Because honestly, that is not our problem to solve.


Read Requesting Help. Create a reproducible example.

Again,

I am closing this topic now.

Ask your question again when you are ready to share an example project showing this issue.

Requesting Help / Docs

1 Like