html - 本地 Jekyll 服务/实时站点差异

标签 html github markdown jekyll github-flavored-markdown

我正在使用主题创建一个 jekyll 博客以托管在我的 github.io 帐户上。问题很简单:当我运行“jekyll serve”时,网站会在本地生成,因为它应该没有问题。但是,当我将它推送到 my_profile.github.io 存储库时,它断网了。

我很困惑为什么会这样。我在堆栈上发现了另一个问题:Locally building and pushing jekyll site to github pages .回答者建议仅推送自动生成的 jekyll 的 _site 文件夹。但是,这并没有为我解决问题。

如果有人想试一试,请链接到我的仓库: https://stackoverflow.com/questions/36377865/locally-building-and-pushing-jekyll-site-to-github-pages

链接到损坏的实时页面:https://spirited-away.github.io/

任何想法表示赞赏!

最佳答案

看起来您正在使用 http:// 请求 Assets ,但在 https:// 上提供您的网站。浏览器不喜欢这样。使用您的浏览器开发人员工具查看错误。

虽然我不能确定没有 repo URL,但你可能在你的 _config.yml 中设置了这样的东西:

url: http://spirited-away.github.io/

将其更改为:

url: https://spirited-away.github.io/

关于html - 本地 Jekyll 服务/实时站点差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39561412/

相关文章:

git - 如何在 github 存储库中执行状态检查

git - "Connection to github.com closed by remote host"推送时

javascript - 未捕获的语法错误 : Unexpected token ILLEGAL multiple string

html - Github、Jupyter - 将上传到 github 的 jupyter 笔记本中的文本居中对齐

javascript - JQuery 无法识别动态生成的 id

javascript - jQuery 向字符串中添加不需要的字符?

javascript - AngularJS 内容和谷歌

Git 推送失败

python - 使用 Python markdown Treeprocessor 包装 etree 元素

javascript - 如何仅使 div 的 .text 可点击以触发事件?