TL;DR
My Pelican blog is served through HTTPS but CSSs are not loaded because of "mixed content", even though they appear in the page source as HTTPS.
Context
I have a Pelican blog hosted on GitHub pages. I have a CNAME record for a custom domain to point to this blog.
The aim
I'm trying to achieve serving this blog with HTTPS, which is possible with CloudFlare (GitHub support told me it's the only solution at the moment).
The problem
After setting everything as indicated, I can access my blog securely but CSSs are not loaded because they are indicated as mixed content.
However, when I look at the page source, all CSSs should be served with HTTPS (as it's included with protocol-relative URLs):
<head>
<meta charset="utf-8">
...
<link href="//nonatomiclabs.github.io/theme/css/ipython.css" rel="stylesheet">
<link href="//nonatomiclabs.github.io/theme/css/bootstrap.min.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//nonatomiclabs.github.io/theme/css/local.css" rel="stylesheet">
<link href="//nonatomiclabs.github.io/theme/css/pygments.css" rel="stylesheet">
</head>
I have tried setting Pelican SITEURL
variable to both //nonatomiclabs.github.io
and https://nonatomiclabs.github.io
and this does not change anything (so the problem is not due to the use of protocol-relative URLs).
CloudFlare also has an "Automatic HTTPS Rewrites" feature which is supposed to get rid/reduce mixed content problems but does not help in my case.
Questions
- How is it possible that the browser (both Chrome and Safari at least) shows the page source with HTTPS or protocol-relative URLs but that those seem not to be respected?
- Who is "responsible" for the problem? Pelican, CloudFlare, the browser, etc.?
- How to solve the problem?
If one needs to see the code:
- the website is served at https://nonatomiclabs.com
- the source code can be found at https://github.com/nonatomiclabs/nonatomiclabs.github.io
- the
source
branch contains the Pelican source - the
master
branch contains the published site
- the