Jekyll site works locally but not on Github Pages

半世苍凉 提交于 2019-11-28 13:32:06

Faced exactly same issue long back and it consumed 2-3 days. Find your main stylesheets (like main.css) and save it to assets folder and commit. This way Github will be copying stylesheet to site built. It usually won't copy :( main.css

I followed the suggestion of dracos on this GitHub Issue page and related commit to change /_includes/head.html from:

<link rel="stylesheet" href="{{ site.baseurl }}public/css/poole.css">

to

<link rel="stylesheet" href="{{ "/public/css/poole.css" | relative_url }}">

Changing most site.baseurl references to relative_url works in both local testing and on GitHub Pages.

My commit for changes to my site can be found below: https://github.com/naamancampbell/naamancampbell.github.io/commit/f60da4d4e48447708c2e157ff1e07303d5377587

As someone pointed out, the live demo uses a different stylesheet. So the repo isn't the same. I suggest creating a new issue in the repository.

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