How It Was Before
I was using the standard /content/ directory for all my pages and blog posts. Nothing much, a few directories and sub-directories and plus or minus 30 files. All was working.
In my dev environment only (don’t yet have a public site), on Linux (Debian jessie 3.16.0-4-amd64) with hugo version 0.37
When I http://localhost:1313 the homepage appears with all the TABS and content (except the BLOG section where there are no posts). But when I want to go to a TAB, I get the following: “404 page not found” (not the nice hugo one). This is for everything in /content/
What I Did To Make This Happen
- mv content/blog/diary/me/ trashdirectory/
- Then “The Problem”.
- So obviously I moved the directory back, but didn’t work.
- I restarted/rebuilt/put verbose and debug/created new files/directories, nothing worked content/ just didn’t work.
- Created a new dir testcontent/ with a new file, moo.md and ran hugo with -c testcontent/ Worked great for moo.md and the blog didn’t give a 404 page but a blank page.
- cp content/ to testcontent/ still running hugo on -c testcontent/ and all works, except the blog which gives a blank page or certains things don’t work (don’t remember exactly because I can’t reproduce it!) AND NOW this doesn’t work anymore either.
- So I created a new directory moomoo/ with a moo.md file and ran hugo with -c moomoo/ and it works now!!!
- cp -R content/ to moomoo/ and works great except for blog which is a blank page. BUT… when I restart hugo then moomoo/ doesn’t work anymore. So I could keep on going, works once.
- This is my run command to hugo (but it hasn’t changed since before the problem): hugo server -D --bind=“0.0.0.0” -c moomoo/
How To Fix
- Do it the lazy way and use a new dir like testcontent/ moomoo/ but it doesn’t seem to be stable and work indefinitely and would require figuring out why the blog doesn’t work AND my husband will kill me for taking this route and not fixing the problem.
- Revert to an older version of the site and loose all that I’ve done since the last git push (and, I know it’s bad, but I don’t do it enough) and still a lazy way out which might not work anyway.
- Actually fix the problem (but I’ve hit the limits of my troubleshooting and technical skills)
Any ideas? Does anyone know how to fix this?