GitHub Pages without Peaceiris possible? (Old-style /docs dir vs Hugo /publish)

@bwintx thanks for the example. I saw it uses: cloudflare/pages-action@1, instead of Peaceiris. I thought it still is using some unknown code to render properly. So I searched on how to force the index.html and found these:

https: //discourse.gohugo.io/t/open-built-website-from-local-folder-without-running-a-server/34193
https: //discourse.gohugo.io/t/site-looks-fine-on-localhost-and-github-pages-but-not-when-rendering-to-public/35825/2

The second one said to put these lines in the config.yaml/toml, and it worked!

baseURL: /
relativeUrls: true
uglyurls: true

Which is nice because I suspected it was a relative path issue… wasnt finding the .js files. Somehow both Deploy solutions must be setting these paths in the background.

So now I can use either the Github Actions deploy, or just build locally and git push the publishDir, and organize my directories accordingly. Either way, I’m happy to be able to troubleshoot code locally with just the index.html and know there isnt any other fancy magic working.

Of course, I would have to set them back to use GH Actions again. But I like that I know how to use Hugo without code that I dont understand.

1 Like