When I open the html files generated in the public folder, I want the site navigation to work. I don’t want to run the “hugo -server” command at all, I just want the site in the public folder to work as is. Setting relativeUrl and uglyUrl to true in my config file has gotten me most of the way there, but some links are still broken.
I want every single link hugo generates to end in “index.html”, and I don’t want to manually set frontmatter for every page to make this happen. The documentation about URL management URL Management | Hugo suggests that what I am trying to do should be possible.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
I tried to edit it in to the original post but I can only put two links as I am a new user.
Edit: I should also give an example of a broken link! The link to the homepage “My blog” at the top left, is missing “index.html”. The link to the french version of the page is also broken. Interestingly, the link to the different language pages work, if you open post.hmtl in the public folder, instead of index.html. I don’t know what post.html is, or why it exists. The link to “My blog” however, is always broken.
Thanks, I made the changes you suggested, and now there is a link to the homepage that works!
It actually appears above the original link to the homepage, but that’s ok:
It is extremely helpful to understand that this is not a regular use case for hugo, so I will look into other ways to provide a offline version of a site. Thanks again for your help!