raw
1
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:
but…
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:
Any thoughts?
zwbetz
2
That GitLab link you provided requires a sign in.
But just looking at your site source, if I change
http://anythingstore.com/css/screen.css
To be https
then your site looks good again
raw
3
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 )
zwbetz
4
Not sure. Perhaps you could configure gitlab to redirect HTTP to HTTPS
raw
5
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.
mojoa
7
Github and Cloudflare do work together just fine.
There can be an issue with mixed content described here:
https://help.github.com/articles/securing-your-github-pages-site-with-https
Additional: