Build doesn't match repo

My latest push to the repo changed a link in a config file.

The site shows a completely wrong link.

You don’t need to know Hugo (not clear anyone but its developers actually know it…).

The setting is:

[[menu.nav]]
    name = "About"
    url = "/posts/about/"
    weight = "-100"

This sets one item in the navigation menu of the website.

The website shows the link as:

https://lewislevin-com.onrender.com/extras/about

This was several versions ago and altered by the most recent commit. The link should be to …/posts/about

Let’s see: is Hugo broken? is Render broken? Is github broken?

Since we can inspect the repo at https://github/lewisl/lewislevin-com in the file config.toml we can tell that github has the latest commit.

The means one of Hugo or Render is not clearing its cache properly.

The last time I deployed, I rebuilt the cache in a manual deploy.

That leaves Render’s instance of Hugo. I can only suspect some kind of cache corruption.

This site is tiny at only 269K so it’s not a size problem.

Frustrated.

I deleted the static site and rebuilt the static site.

Now it’s even more broken.

Nothing appears at all even though the last commit is insignificant.

I made some changes recommended by the folks at Hugo. The site works locally. I pushed the changes and rebuilt and redeployed.

Nothing appears except “Not Found”.

I’ve compared it to the site that works well and the settings seem to be the same.

Pretty stuck here.

I referred to your correct GitHub project:
https://github.com/lewisl/lewislevin-com

I use Hugo a lot, but it certainly looks like a problem that has nothing to do with it.
Render does not delete previously generated files.
I did a simple HTML add / remove and confirmed this.

Hugo does not support deleting public folders.
This will continue to be a problem when using Hugo with Render.

The fact that it doesn’t build after reconnecting to GitHub seems to be another issue.

Well thanks.

What Render does is pretty much a black box despite the console messages. If they don’t delete the public directory they create during the build–if they just do it incrementally even when you choose Clear Build cache and Deploy then something is wrong. Clearing the Build cache should start over instead of doing an incremental update. What else could “clear build cache” mean–it should mean CLEAR THE CACHE. They could be issuing the wrong Hugo command.

I deleted the static site completely and then recreated from the repo. Does nothing. Pretty messed up. Maybe because I used the same name, it kept detritus–pretty bad, but likely.

So, I tried with new name. Same problem.

Render will have to fix this. Some serious cache management problems. Render is probably using the repo name as an ID for the cache and the static site. In addition to just fixing this one site, seems like the workflow is wrong and Render needs to change the what the code does. Delete must mean DELETE–not “sort of remove with stuff hanging around.”

OK. I am done debugging Render.

I created a new repo under a different name. A new static site for the 3rd time.

Same problem.

OK, Render–your turn.

OK.

I built to a different directory. I was building to ./ (which works for my other static site using Hugo).

This time I built to ./public. This now works. There may still be detritus at ./ which Render should look at and figure out how to clean the cache.

I tried ./build and it said directory doesn’t exist. You’d think it would create it.

As this is all pretty much a black box (somewhat by design to “simplify”) so we can’t tell what directories do and don’t exist on the virtual space where the finished build resides. Probably might be good to know that.

Any way this fixes it but not a confidence-inspiring experience.