Site deployed with hugo: CSS not loading

Hello, I’m trying to host a simple static blog with Cloudflare pages using hugo. I’ve got my custom domain linked, I also have it deployed and it is loading up. However, none of the css is applying, text all renders fine but none of the styling is there. Under the network tab within dev tools, I’m noticing an error where it’s blocking mixed content from loading, the URL is pointing to a .css page hosted on the site containing all the styling. For reference, if I were to click on said link, copy all the raw CSS then hop over into the style editor within the dev tools and paste it there, my site looks as it should (just client side obviously). I’m assuming I have to force all content to be loaded through https though I’m at a loss on how to move forward to resolve this issue. Thank you for taking the time to read though my message, any recommendations on how I could proceed are much appreciated.
As a reference, I’ll attach a picture of the page loaded locally, presented as intended as well as the link to my page to show the obvious visual differences:

I’m seeing this error in Console:
“” is not eligible for integrity checks since it’s neither CORS-enabled nor same-origin.

This is interesting because most of your links are to apex, yet the site redirects to www. Pick one or the other (www vs non-), and hopefully that will clear up.

Firstly, I greatly appreciate the timely reply! Forgive me for being completely uneducated in regards setting this up as it’s my first real attempt at both Cloudflare pages as well as most of this really, how would I go about choosing one or the other? Is this a misconfigured DNS, or have I messed up in my site’s configs?
Aside from the one “Hello World” post, the only thing I’ve actually modified in terms of the hugo theme is the config, which is only a few lines, only relevant one reads as follows: baseURL = ''

For some reason, it redirects to www. Maybe it’s the custom domain name you set up in Pages (check this first). Or a redirect rule.

If it’s the custom domain name, then delete that one and replace it with just

1 Like

You are correct, I did set it up under the custom domain tab as I deleted it and went through the steps once more, omitting the www.

Just reloaded it and holy Hannah! it works! You’ve saved me a huge headache as I would’ve overlooked that for quite some time to come. I’d happily buy you a beer if I could. Thank you so much

1 Like

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