3
votes

My Code. https://github.com/shingo-nakanishi/jekyll-dojo/tree/03e7541c602daab320b18ec7545e4259433dcaf4

jekyll work in local but not work 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.

Why work in local? How to work in github?

3

3 Answers

6
votes

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

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/"` .

Your site will now work on gh pages. And theme gem is now useless, because overridden by copied files.

4
votes

Github Pages does not have the gem minima available to it. You'll have to manually import that into your repo

2
votes

I believe that you used other theme for your blog, if that so, after you create new Jekyll blog, the default theme is 'minima'. If you copied other theme from the zip file, most of them have the css file inside 'public' folder. So just remove your default 'css' folder that existed after created new Jekyll blog because the actual 'css' file that you'll use is inside 'public' folder created by theme author. Hope this help.