Hi there,
I’m just getting started with hugo and the initio theme. I’m running the server locally while I’m writing up the pages.
It feels like I’m gambling every time I add a character to a page. Reverting that change and even restarting the server does not guarantee that the website will load correctly again. Even removing the whole cache folder does not help! What the heck is going on?! Are the builds not reproducible?!
Update: I can confirm that the builds are not reproducible. To reproduce, just launch the server and open the sitemap.xml file (http://localhost:1313/sitemap.xml). I had one launch where the data was present. Then, stop the server (Ctrl+C) and remove the cache (rm -rf /tmp/hugo_cache/
). Restart the server with the same version of hugo, and refresh the sitemap.xml page: all of the posts are gone. Awesome. The only work around I’ve found so far is to modify some at least one character in all of the pages that you really want on the site. This sure is going to be tedious!
Example 1: removing a commented line
For example, I just removed a commented line from the config.toml file and now the index.md front page won’t load anymore.
Going from:
[params]
name = "Chris R..."
description = "Blah blah"
email = "myemail@email.com"
# phone = "+234 23 9873237"
# address = "234 Hidden Pond Road, Ashland City, TN 37015"
# year = 2017
# avatar = "images/guy.jpg"
avatar = "gfx/diving2.jpg"
avatarclass = "circle"
To (removing the commented line starting with #avatar
):
[params]
name = "Chris R..."
description = "Blah blah"
email = "myemail@email.com"
# phone = "+234 23 9873237"
# address = "234 Hidden Pond Road, Ashland City, TN 37015"
# year = 2017
avatar = "gfx/diving2.jpg"
avatarclass = "circle"
Causes the front page at /
to not have any content but the menu, header and footer.
Example 2: adding a navigation link
For example, my config had the following:
[[menu.main]]
name = "posts"
url = "/post/"
weight = 1
[[menu.main]]
name = "publications"
url = "/publications/"
weight = 5
I changed it to the following
[[menu.main]]
name = "home"
url = "/"
weight = 1
[[menu.main]]
name = "posts"
url = "/post/"
weight = 2
[[menu.main]]
name = "publications"
url = "/publications/"
weight = 5
And now, the link to “publications/” returns a 404. Moments earlier that link worked!
Additional notes
This is extremely frustrating. How can I solve this? Seriously considering using another tool for my site, wow.
- I’m running the server as
hugo serve --disableFastRender
. - I’ve encountered this problem both with version 0.80.0 and 0.79.1
- The
content/publications
folder has a_index.md
which was working perfectly fine. And now, even reverting to a previous git commit does not solve the problem… so it seems that hugo is caching some built site somewhere.
Thanks