Mixed Asset Issue with Hugo and Baidu Causing Chrome to not load CSS

I am using this ‘hugo-theme-cleanwhite’ theme in Hugo:

Here is my cloned repo:

The site is live at:


It seems to work alright in Firefox but Chrome will not load CSS and I think it is due to Mixed Content, specifically requesting an insecure image ‘http://www.baidu.com/search/error.html’.

I am fairly new to this and cannot figure out a way to rid the public project of any reference to Baidu since I have no use for it. Anybody who can give advice I would really appreciate it.

From the theme’s readme, the analytics section: https://github.com/zhaohuabing/hugo-theme-cleanwhite/blob/1217229bf2d417d6d54f0083a91530c3e43dc3fb/exampleSite/content/post/readme.md#analytics

Leave the googleAnalytics or ba_track_id key empty to disable it.

So try adding this to your config.toml file:

  ba_track_id = ""

Also, see the theme’s example config.toml https://github.com/zhaohuabing/hugo-theme-cleanwhite/blob/3ee4f2184fd6f37d6f590942157e8c7fca83ac88/exampleSite/config.toml

Thank you, I added the empty key into my [params] and built the public folder again into my repo that is served on Github Pages:

It still had references to Baidu analytics though so I manually removed all instances and still Chrome will not load the CSS. Not sure what the issue is now but I reached out to the theme author to see if he had any advice

I think now that it is due to - net::ERR_CERT_COMMON_NAME_INVALID while trying to GET assets such as my site CSS

If you’re serving through https, set the first line of config.toml to baseURL = "https://devandthedu.de"

+1 for usage of The Dude (I am an ordained priest of The Church of Dudism, just saying ;))

Check your footer.html and remove the whole section for baidu:

You can search for each occurrence of “baidu” in Github on the search form in the top right and this is the only location I see it appearing.


to correct myself: I would overwrite the file in the theme. Make a copy, save it in /layouts/partials/footer.html and remove the baidu part.

The next section does not even ask for the Baidu code, so this could be removed too (and most probably is the bad guy retrieving a non-existing ID and such delivering the error.html):

That’s a bug in the theme and you might want to open an issue in the theme-repository for that.