Github IO页面不加载CSS [英] Github IO page does not load CSS

查看:983
本文介绍了Github IO页面不加载CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解为什么我的CSS资源没有加载到我的个人Github IO页面 tobias-schmidt.site

I would like to understand why my CSS resources are not loaded on my personal Github IO page tobias-schmidt.site.

当我通过自定义dns tobias-schmidt.site 或通过直接github dns mrtobe.github访问我的页面。 io该站点正确加载index.html但不是引用的CSS文件。当我点击博客文章时,它正确地加载了CSS。然后,对于这个冲浪会话,index.html也可以使用CSS。

When I acess my page via the custom dns tobias-schmidt.site or via the direct github dns mrtobe.github.io the site correctly loads the index.html but not the referenced CSS files. When I click on the blog post it does correctly load the CSS. Then for this surfing session the CSS is also available on the index.html.

  • dns from GoDaddy with A-Record setup for tobias-schmidt.site - this dns was added in the settings of the github repo
  • Website is generated with hugo - full project is hosted under https://github.com/mrtobe/mrtobe-hugo - ./deloy.sh is used to deploy the page
  • Hugo generates a static website that is hosted here https://github.com/mrtobe/mrtobe.github.io

我检查了不同的帖子,发现它可能是混合的内容,但我不知道如何使用github页面解决这个问题。

I checked different posts and found that it might be mixed content, but I have no idea on how to solve this with github pages.

推荐答案

您有SSL证书问题。


tobias-schmidt.site使用无效的安全证书。

tobias-schmidt.site uses an invalid security certificate.

证书仅对以下名称有效:* .github.com,github.com, * .github.io

The certificate is only valid for the following names: *.github.com, github.com, *.github.io

错误代码:SSL_ERROR_BAD_CERT_DOMAIN

Error code: SSL_ERROR_BAD_CERT_DOMAIN

Github页面不为自定义域提供HTTPS。

当您访问 https://tobias-schmidt.site github页面服务器发送的证书对您的域无效,浏览器阻止请求,直到您同意使用此证书。

When you access https://tobias-schmidt.site github pages server is sending his certificate which is not valid for your domain and browser are blocking request until you agree using this certificate.

现在,在 conf.toml ,您必须设置 baseurl =http://tobias-schmidt.site。这是为了拥有hugo工艺http urls。

For now, in conf.toml, you have to set baseurl = "http://tobias-schmidt.site". This in order to have hugo craft http urls.

第二次,您可以尝试使用cloudflare等服务来保护您的网站,或者查看 Netlify

这篇关于Github IO页面不加载CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆