[SOLVED] Homepage content randomly displayed or disappearing

I’m working on a simple 5 page website.

I just realized while running “hugo server” and looking at my site, and doing changes (as similar as adding or removing a word in the content .md files), after each rebuild the Home page content from the _index.md file is sometimes included in the home page, and sometimes not.

But there is no logical, reproducible behaviour. On some changes, the content disappears, on some changes, it comes back.
But it is not as easy as undoing exactly the change made before after which it disappeared and then it comes back. It’s totally random. And I tested that now a nearly 100 times.

And, I also just tried additionally to just start and stop the server and check if the content is there or not - even with that, the inlcusion of this content is randomly happening or not.

The same happens with “normal” generation runs. I can run hugo twice, like this:

$ hugo 

                   | EN  
+------------------+----+
  Pages            | 11  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 13  
  Processed images |  0  
  Aliases          |  2  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 40 ms
$ hugo 

                   | EN  
+------------------+----+
  Pages            | 11  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     | 13  
  Processed images |  0  
  Aliases          |  2  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 53 ms

One time the _index.md content is included, the other time not.

Repo: https://github.com/henning/hugo-website 3

hugo env:

$ hugo env
Hugo Static Site Generator v0.40.3 darwin/amd64 BuildDate:
GOOS=“darwin”
GOARCH=“amd64”
GOVERSION=“go1.10.2”

Your repo doesn’t match the build stats you post above.

I don’t understand this remark. Which symptom does lead to that assumption?

When I run it here, the code available in the repo (commit ee32d4b)
leads to exactly the output posted above when I run “hugo”.

Sometimes the content of _index.md is included “properly” as expected ( I expect it to be in the body part of the index.html) - sometimes it is missing completely.
And right now, looking at it again with: “hugo && cat public/index.html && wc -l public/index.html” (the last part just to immediately see that this run produced a different result than the other without parsing the html with the eyes - different line counts tell me content is changing)

I even see it flaps between these two and even a third option: occasionally random parts of the “_index.md” content partially are inserted somewhere even after closing html and body tags…

Here a gist with the three variants of index.html output I get when I run the build a few times in a row - not touching anything in between: https://gist.github.com/henning/7891d98d756be6626ef37d3d4f38455d

And yes, I pushed a change right now to adjust some of the weight settings - but effects described and also build output stays exactly the same (besides the menu order changed by the weights) between the commit id written above and the new head of master with long id 34746d7318e42d1f9ac4197653b74e87442eb3db
index.html content still randomly changing without changes in any part of the site sources or config.

This

Creates an ambigous situation, i.e. two pages that points to the same URL. So, what you see is a taxonomy term list page … and some times the home page.

I think we have another issue about this, but you cannot have empty strings in the taxonomy config.

If having the taxonomy empty is considered wrong/broken/unallowed input - why doesn’t the program tell the user?

Besides that (me thinking a program shouldn’t allow for input that is wrong), yes it works to remove this taxonomy stuff completely.
I don’t remember why I did it, but I assume there was some reason because something wasn’t working without that when I started to make the first steps with hugo. But I started this thing a few months ago, so it was an older version of hugo as well as of the theme.

Thanks.

I think the phrase you were looking for is “thank you very much for spending some time on a Sunday to look into my problem.”

This has discussed before. We should issue a warning in this case, but this is about priority. Someone has to do some work on their free time to get that warning in there.

6 Likes