Some issues with hugo blog deployment

Hi all:
I have been trying to deploy a basic hugo blog, and keep running into issues (I’m a newbie, mostly following online directions).

I have created a local hugo install, made a simple first post, and can see it on a local server.
I then pushed the info to github, created a clouflare “page project”, and linked the github.

The build works with no issue on pages, but the content does not render properly (at all):
Here is the log (everything looks ok):

|2023-10-31T16:22:07.226774Z|Cloning repository...|
|2023-10-31T16:22:08.695542Z| * branch            0c5cc8fd3af81a1bd148833eb32e392442876599 -> FETCH_HEAD|
|2023-10-31T16:22:08.810285Z|HEAD is now at 0c5cc8f changed config|
|2023-10-31T16:22:08.958586Z|Success: Finished cloning repository files|
|2023-10-31T16:22:10.017491Z|No build command specified. Skipping build step.|
|2023-10-31T16:22:10.018731Z|Note: No functions dir at /functions found. Skipping.|
|2023-10-31T16:22:10.019009Z|Validating asset output directory|
|2023-10-31T16:22:10.797114Z|Deploying your site to Cloudflare's global network...|
|2023-10-31T16:22:13.590215Z|Uploading... (66/66)|
|2023-10-31T16:22:13.591042Z|✨ Success! Uploaded 0 files (66 already uploaded) (0.47 sec)|
|2023-10-31T16:22:13.891556Z|✨ Upload complete!|
|2023-10-31T16:22:16.123394Z|Success: Assets published!|
|2023-10-31T16:22:17.072643Z|Success: Your site was deployed!|

(I have tried it with and without the “hugo” command on build"… get to the same place:

Here is the github:
I am using the “newsroom” theme (if that matters).

my Hugo version installed on my local machine is 0.98.0

I have read multiple hugo install pages and “how to host a hugo blog on cloudflaire…”

As this is my first time doing this, and I’ll a little out of my element, I think I’m missing something obvious (like something obvious isn’t being uploaded to my github).

Any assistance would be very much appreciated…

Please take a look into your browsers console:

This is not a Cloudflare Pages error but rather a Hugo configuration issue. There are three main problems:

Problem 1 (Custom Domain):

  1. It appears that you intend to host your blog under, but you have not configured this domain in Cloudflare Pages.
  2. Please refer to this guide: Custom domains · Cloudflare Pages docs
  3. Configure as your custom domain to serve

Problem 2 (mixed-content):

For mixed-content issues, there are several potential solutions:

  1. Use relative URLs with a schema like this: //, which will adapt to the current session’s schema.
  2. Utilize relative paths like this: /images/thumbnail.svg, which will automatically use the schema & authority of the current session.

Problem 3 (Hugo Configuration):

If you prefer not to use relative paths and explicitly want to use the domain in your links, you should define this fully qualified domain name as a variable and incorporate it into every URL you generate.

Personally, I would recommend using relative paths, as they tend to be the most compatible solution.

First, thank you for your reply!

I did originally jump in and create a CNAME on cloudflare to point to (I own It was “live”, but the blog looked the same. I want to publish it only to the, and it is… well… a blog, so I don’t think I need tons of “staging areas”.

I’ll redo that and look at see if the console if different…

Would you mind defining “mixed-content”… for me? Is that, internally, some parts of hugo are creating links for and others for…?

If I want to only push to… is my “fix” in the config files I am writting locally (the config.toml file)… looking for all of the places where I can put…?

Wait… just so I am clear… when I put this out at first, I made a CNAME that pointed to… I’m doing that part right… right?

I just checked, and this subdomain does not exist:

Please remove the domain (CNAME) from your DNS section and follow the instructions in this tutorial to set up a custom domain in Cloudflare Pages: Custom domains · Cloudflare Pages docs

Regarding the mixed-content issue, it occurs when a session/connection is established securely, but then a sub-resource is requested using an insecure connection. This means your page is served over HTTPS, but certain requests (as shown in the screenshot) are made over HTTP, which leads to those resources being blocked. This will result in your page not loading properly, as is the case right now.

It’s worth noting that you’re less likely to encounter this issue locally because local traffic typically originates with an HTTP connection and continues with HTTP. Therefore, you might not experience mixed-content errors when testing your site locally.

1 Like

Thanks: looking over these, I realized a big mistake I was making.

yeah… I think I might have one issue figured out: the domain I am using is a .net address, but I made the hugo config as a .com (I own both and just forgot).

The custom domain now works better ( it stops trying to get me to transfer my domain!)…

I will redo my config files and see if that allows hugo to “play nice”…

And, thank you for taking the time to define some things for me. Always learning, right?


I hope so :slight_smile:

Also noticed, you have some malformed URLs/Links in your HTML:

(the three last on the screenshot)

  1. https://blog.texasfluteguild.comsite.webmanifest/
  2. https://blog.texasfluteguild.comfavicon-32x32.png/
  3. https://blog.texasfluteguild.comfavicon-16x16.png/

They should probably be like this:


Well… I got back to where I was last night. config file has changed and things are pointing to where they are supposed to be… but still stuff with the same broken wbesite.

All of the weblinks you are quoting are things “spat out” so to speak, by hugo… I tried to make a “test” post just to get something going (get it working then tinker). It could be in markdown file I am using to create the post. Will play with that and see if I get something better.

However, it does seem like hugo isn’t generating static HTML files that cloudflare pages likes…

Will do some more poking and try different text files

But your still rendering the .com in the URLs, which you need to change to .net:

I would simply download the source code to any linux server and use grep to find the files which are still containing

grep -ril ""

Congratulations! Seems to be working now :wink:

The other errors/bugs should not be hard to fix.

Keep in mind that all these errors are all not related to Cloudflare at all. But would have occoured on every service you would have hosted it on.

1 Like

Haha… I think I did too many things at once, so I don’t know what was up there that “fixed” it… I think I had some html that was pushed…

But… thanks to the computing gods!


yes. It was me and hugo… getting to know each other.
Thank you again for your help!

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