https 禁用 jekyll 主题
https disabled jekyll themes
我创建了包含 github 个页面的主页并将域自定义为 http://www.namespace-pt.com。如下图,我用http protocal.
一切正常
然而,当我尝试检查 github 页面设置中的 enforce https
选项并访问 https://www.namespace-pt.com 时,jekyll 主题 cayman-blog 被禁用并且一切都一团糟。
有人能帮帮我吗?
这可能是因为 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.
在您的情况下,lorepirri/cayman-blog/_layouts/default.html
确实包括:
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | \
append: site.github.build_revision | absolute_url }}">
如果 absolute_url
生成 http://
URL,当您强制执行 HTTPS 时,这将是一个问题。
OP namespace-Pt references in 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.
因此 OP 添加:
I tried to change the absolute_url
to relative_url
, as all my assets are stored locally. It works.
我创建了包含 github 个页面的主页并将域自定义为 http://www.namespace-pt.com。如下图,我用http protocal.
一切正常然而,当我尝试检查 github 页面设置中的 enforce https
选项并访问 https://www.namespace-pt.com 时,jekyll 主题 cayman-blog 被禁用并且一切都一团糟。
有人能帮帮我吗?
这可能是因为 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://
tohttps://
in your site's HTML.
在您的情况下,lorepirri/cayman-blog/_layouts/default.html
确实包括:
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | \
append: site.github.build_revision | absolute_url }}">
如果 absolute_url
生成 http://
URL,当您强制执行 HTTPS 时,这将是一个问题。
OP namespace-Pt references in jekyll/jekyll
issue 5590
While for assets with an
absolute_url
it may still be anhttp://
call, we recommend using therelative_url
for it anyways.
因此 OP 添加:
I tried to change the
absolute_url
torelative_url
, as all my assets are stored locally. It works.