https disabled jekyll themes

Viewed 69

I created my homepage with github pages and customize the domain to http://www.namespace-pt.com. As the following figure shows, everything turns out to be okay when I use http protocal.

enter image description here

However, when I tried to check enforce https option in github pages settings and visit https://www.namespace-pt.com, the jekyll theme cayman-blog is disabled and everything is in a mess.

Could anyone help me? enter image description here

1 Answers

This could be because of mixed content:

If you enable HTTPS for your GitHub Pages site but your site's HTML still references images, CSS, or JavaScript over HTTP, then your site is serving mixed content. Serving mixed content may make your site less secure and cause trouble loading assets.

To remove your site's mixed content, make sure all your assets are served over HTTPS by changing http:// to https:// in your site's HTML.

In your case, lorepirri/cayman-blog/_layouts/default.html does include:

<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | \
                               append: site.github.build_revision | absolute_url }}">

If absolute_url generates an http:// URL, that would be an issue when you enforce HTTPS.


The OP namespace-Pt references in the comments to jekyll/jekyll issue 5590

While for assets with an absolute_url it may still be an http:// call, we recommend using the relative_url for it anyways.

So the OP adds:

I tried to change the absolute_url to relative_url, as all my assets are stored locally. It works.

Related