Server & build are not finding my "content" directory

Help! This one is driving me crazy. Fails with Hugo 0.104.3 and 0.112.5 (latest) on Win10. I’m creating a new website based on an existing website that works fine running 0.104.3. The new and old websites are multilingual (en and fr) with filename based languages (_index.en.html), not separate content dirs.

Evidence that it doesn’t seem to be finding my “content” dir is that in my layouts I print {{ .File.Filename }}.
For the existing (working) site, it displays the absolute path of the source content file but in the new site .File is undefined. This suggests it isn’t finding “content” and so is using a dummy source file.

I’ve tried almost every combination of having index.en.html, _index.en.html, setting contentDir, not setting contentDir, setting module.mounts, not setting module.mounts, and other things. Depending on the combination, I get either A) a single index.html built that redirects to /en/ but that is 404 Not Found or B) the redirecting index.html as well as one for /en/ and /fr/ but these seem to have been built without any source from the content dir (since {{.File.Filename}} is empty and none of the frontmatter params are available).

Any ideas what I might try next (would be greatly appreciated). I’ll work on getting my code in a publicly viewable place.

UPDATE: Code is here: Gitlab Repo
Some explanation required. At the git-level, I have a “hugo” directory that contains all my Hugo stuff. In the existing/working website, I using a module.mounts to source content from “…/content” (I do this so I can tell my non-technical editors to not touch anything inside the “hugo” directory); this works fine for the existing website. It does not work for my new website so I copied “content” into “hugo/content” so it would be in the usual place. That still fails. Many thanks in advance; I’m really stumped on this one.

Some of your dates are in the future.

hugo list future

(red faced) That’s it! Thanks for the extra set of eyes looking at it. Embarassingly obvious now that you point it out. My home page source files had tomorrows date! I guess I’ll cancel quitting IT for good to join a monastery. Thank you, thank you, thank you.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.