I am at a loss to get pages going on a hugo site at github.
The build shows no error but when visiting the site it does not render as it does on my local machine. In fact it seems a real mess with some images and icons at the wrong size and some missing completely, for instance. The text seems to be there but not in the right spot. It looks that perhaps some CSS or SASS is missing or corrupted.
I did clone the repo on my local machine and ran the hugo server on that and it worked perfectly. So I am assuming that the error is on Cloudflare pages somewhere, but of course it could be due to a earlier error on my part as it is is my first try to explore Cloudflare capabilities.
So, in short, no errors but the site does not render as it should.
I have spent two days trying heaps of things and redeploying to try to identify the problem to no avail.
Any clues or any advice about how to fix (delete the site, delete the github-Cloudflare and restart it all, or else?
Thanks for any advice.
Which version of Hugo are you using locally? It’s very possible that there’s a version mismatch causing the issues you’re seeing. Pages uses a very old version by default (0.54.0), but you can override this by setting the
HUGO_VERSION env var.
Yes, I already checked all that. I am using Hugo v0.97.3 locally and I set up the same in the env variable HUGO_VERSION of the build.
That was one of the first thing I did fix after my first try.
Thanks for your attention to this.
I finally managed to get the site going correctly.
I have not been able yet to absolutely prove what the issue was, as Cloudflare pages appears more as a black-box to the user, but I think that the problem was caused by my both, putting in “hugo” as a command in the deployment settings whilst also setting Hugo as the framework.
Just setting Hugo as framework and no command seems to work.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.