本地Jekyll服务/ Live Site差异 [英] Local Jekyll Serve/Live Site discrepancy
问题描述
我正在创建一个jekyll博客,以使用主题在我的github.io帐户上进行托管。问题很简单:当我运行'jekyll serve'时,网站在本地生成,因为它应该没有问题。但是,当我将它推送到my_profile.github.io存储库时,它已经突破在线。
I am creating a jekyll blog to host on my github.io account using a theme. The problem is simple: when I run 'jekyll serve' the site generates locally as it should with no issues. However, when I push it to my_profile.github.io repository, it is breaking online.
我很困惑为什么会发生这种情况。我在堆栈上发现了另一个问题:本地建设和推动jekyll网站到github页面。回答者建议只推送自动生成的jekyll的_site文件夹。然而,这并不能解决我的问题。
I'm confused as to why this is happening. I found one other question here on stack: Locally building and pushing jekyll site to github pages. An answerer recommends pushing only the _site folder of jekyll that gets auto-generated. However, that didn't solve it for me.
如果有人想采取刺的话,请链接到我的回购:
https://stackoverflow.com/questions/36377865/locally-building-and-pushing-jekyll-site-to-github - 页面
Link to my repo if anyone wants to take a stab: https://stackoverflow.com/questions/36377865/locally-building-and-pushing-jekyll-site-to-github-pages
链接到损坏的实时页面: https://spirited-away.github.io/
Link to broken live page: https://spirited-away.github.io/
任何想法都可以使用!
推荐答案
看起来您正在使用 http://
请求资产,但在 https: //
。浏览器不喜欢那样。使用浏览器开发人员工具查看错误。
Looks like you're requesting assets with http://
, but serving your site on https://
. Browsers don't like that. Use your browser developer tools to see the errors.
虽然我无法确定没有回购网址,但您可能在 _config.yml
:
Although I can't be sure without a repo URL, you've probably got something like this set in your _config.yml
:
url: http://spirited-away.github.io/
更改为:
Change it to:
url: https://spirited-away.github.io/
这篇关于本地Jekyll服务/ Live Site差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!