jekyll在本地工作,但在github上不工作.找不到或不可读的导入文件:最小值 [英] jekyll work in local but not work github. File to import not found or unreadable: minima
问题描述
我的代码. https://github.com/shingo-nakanishi/jekyll-dojo/tree/03e7541c602daab320b18ec7545e4259433dcaf4
jekyll在本地工作,但在github上不工作.
jekyll work in local but not work github.
页面构建失败,并出现以下错误:
The page build failed with the following error:
您的SCSS文件css/main.scss
在第36行出现错误:找不到导入文件或文件不可读:最小值.有关更多信息,请参见 https://help.github .com/articles/page-build-failed-invalid-sass-or-scss .
Your SCSS file css/main.scss
has an error on line 36: File to import not found or unreadable: minima. For more information, see https://help.github.com/articles/page-build-failed-invalid-sass-or-scss.
为什么要在当地工作?如何在github中工作?
Why work in local? How to work in github?
推荐答案
Jekyll 3.2使用基于gem的主题,但github页面仍为3.1.X版.
Jekyll 3.2 use gem based themes but github pages is still at version 3.1.X.
您必须先找到您的极品宝石:
You have to first locate your minima gem :
bundle show minima
会给您类似/very/long/path/to/2.2.0/gems/minima-1.0.1
的信息.然后,您可以将gem中的_includes,_layouts和_sass文件夹复制/粘贴到文件浏览器中的站点根目录.
Will give you something like /very/long/path/to/2.2.0/gems/minima-1.0.1
. You can then copy/paste _includes, _layouts and _sass folders from your gem to your site root from the file explorer.
或者您可以从根目录使用命令行来完成此操作:
Or you can do it with the command line from your root :
cd your/root/folder
cp -R `echo "$(bundle show minima)/_*/"` .
cp -R `echo "$(bundle show minima)/assets/"` .
您的网站现在可以在gh页上工作.主题gem现在已无用,因为已被复制的文件覆盖.
Your site will now work on gh pages. And theme gem is now useless, because overridden by copied files.
这篇关于jekyll在本地工作,但在github上不工作.找不到或不可读的导入文件:最小值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!