The style paths don’t render correctly when I push a build from “hugo"
The link paths don’t render correctly when I push a build from “hugo server” (the hugo-built ones do, but not if I write something like <a href="z/y.html">x</a>, on GitHub that ignores the base URL that includes the repo name
I suggest you consolidate… unless you need different configuration for your production and server environments, which you don’t, consolidate everything into the first file, and delete the others.
In the first one you have this:
relativeURLs = true
canonifyURLs = true
Delete that bit. They don’t do what you think they do, and the documentation contains warnings about each, advising you not to use them.
Keep in mind that the best configuration file is the shortest configuration file that meets your needs; get rid of all the settings that don’t change the defaults, for example:
disableLanguages
hasCJKLanguage
defaultContentLanguage
defaultContentLanguageInSubdir
the entire services key
the entire pagination key
and there may be others
It also looks like you have directly modified some of the files in the themes directory, which isn’t a great idea. Instead of modifying theme files, override them by creating files with same path in your project directory (e.g., override themes/foo/layouts/page.html with layouts/page.html. That way you can update the theme without losing your changes.
After you have done all of the above, test again and come back here if you’re still having trouble.
Thank you! I cleaned it up a bit, but it didn’t work. So I looked at the original code from the repo I cloned and looked at links. They’re now formatted like this:
I am so thankful for your responses, as otherwise it’s unlikely I would’ve gone back to the beginning, and I’ve learned a lot along the way. I’m not sure which response made the difference, but here is my list of things to try:
fix the baseURL (hugoplate needs this in both /hugo.toml and /config/_default/hugo.toml (if you’re missing /hugo.toml, the GitHub action will fail)