hexo d一键部署后查看效果发现博客页面的样式全丢失了,查看控制台发现了端倪:
Mixed Content: The page at 'https://xxx.github.io/' was loaded over HTTPS, but requested an insecure stylesheet 'http://xxx.com/lib/font-awesome/css/font-awesome.min.css?v=4.6.2'. This request has been blocked; the content must be served over HTTPS.
意思就是GitHub账号:https://xxx.github.io是https头的,而css文件存储的路径 http://xxx.com/lib/font-awesome/css/font-awesome.min.css?v=4.6.2
http开头的,被认为是不安全链接,故而无法加载。
解决方案:在博客根目录中找到index.html文件,添加下面代码,用于强制把http转换成https:
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
标签:http,awesome,xxx,https,生效,font,链接,css From: https://www.cnblogs.com/iuniko/p/17790777.html