Jekyll网站可在本地使用,但不能在Github Pages上使用 [英] Jekyll site works locally but not on Github Pages
问题描述
我分叉了Solid-jekyll主题(solid-jekyll),并使其在本地工作.但是,当我将其推送到Github页面时,似乎松散了它的CSS格式.
I forked the Solid-jekyll theme (solid-jekyll) and got it to work locally. However, when I pushed it up to Github pages, it seems to loose it's css formatting.
我的solid-jekyll叉子在github上,用户名:BeenzSyed.我尝试将baseurl更改为"/solid-jekyll",但这也不起作用.
My fork of solid-jekyll is on github, username:BeenzSyed. I tried changing the baseurl to "/solid-jekyll" but that didn't work either.
这是我的叉子上的样子: https://beenzsyed.github.io/solid -jekyll/.
This is what it looks like on my fork: https://beenzsyed.github.io/solid-jekyll/.
这应该是这样的: http://ojs.xyz/solid-jekyll/.
我认为是因为找不到_includes/css/style.css文件,但是我不确定该如何解决.感谢您的帮助!
I think it's because it can't find the _includes/css/style.css file but I'm not sure what to do to fix that. Any help is appreciated!
推荐答案
很久以前就遇到了完全相同的问题,它耗时2-3天.找到您的主要样式表(像main.css一样的 )并将其保存到 assets 文件夹并提交. Github将通过这种方式将样式表复制到网站上.通常不会复制:( main.css
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
这篇关于Jekyll网站可在本地使用,但不能在Github Pages上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!