我的代码。 https://github.com/shingo-nakanishi/jekyll-dojo/tree/03e7541c602daab320b18ec7545e4259433dcaf4
jekyll 在本地工作,但在 github 上不工作。
The page build failed with the following error:
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上工作?
最佳答案
Jekyll 3.2 使用基于 gem 的主题,但 github 页面仍为 3.1.X 版本。
您必须首先找到您的最小 gem :
bundle show minima
会给你类似/very/long/path/to/2.2.0/gems/minima-1.0.1
的内容。然后,您可以从文件资源管理器将 _includes、_layouts 和 _sass 文件夹从 gem 复制/粘贴到站点根目录。
或者您可以使用根目录中的命令行来执行此操作:
cd your/root/folder
cp -R `echo "$(bundle show minima)/_*/"` .
cp -R `echo "$(bundle show minima)/assets/"` .
您的网站现在可以在 gh 页面上运行。主题 gem 现在没用了,因为被复制的文件覆盖。
关于jekyll 在本地工作,但在 github 上不工作。要导入的文件未找到或无法读取 : minima,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38772179/