Local Jekyll Serve/Live Site discrepancy

风流意气都作罢 提交于 2019-12-11 01:13:01

问题


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.

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.

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

Link to broken live page: https://spirited-away.github.io/

Any ideas appreciated!


回答1:


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.

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/


来源:https://stackoverflow.com/questions/39561412/local-jekyll-serve-live-site-discrepancy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!