I just finished setting up a new site on GitLab pages. I’m having a weird issue where the theme doesn’t load if you force HTTPS.
http://anythingstore.com/ looks like this:
https://anythingstore.com/ looks like this:
Here is the repo: Raymond Weitekamp / the-anything-store-site · GitLab
TLS appears to be set up correctly on GitLab side, via Cloudflare:
That GitLab link you provided requires a sign in.
But just looking at your site source, if I change
https then your site looks good again
I just made the GitLab repo public.
So there is definitely a baseURL issue.
I just swapped baseURL = “https://anythingstore.com/”. Now HTTPS works but HTTP doesn’t.
Any thoughts on how to make both work? (On the hugo side, I guess I can always force HTTPS as a workaround)
I’m just confused because I have other hugo sites on Gitlab where this is not a problem (like https://gitlab.com/rawwerks/phd-to-ceo-squeeze )
Not sure. Perhaps you could configure gitlab to redirect HTTP to HTTPS
for now i’m rerouting HTTP => HTTPS w/ cloudflare, but this appears to be the solution:
Gitlab Pages doesn’t offer this service.
Protocol relative URLs are an anti-pattern. A website is ideally served under HTTPS.
I suggest that you use an alternative free service that offers HTTP —> HTTPS redirection, like Netlify.
Github and Cloudflare do work together just fine.
There can be an issue with mixed content described here: