Reputation: 510
I downloaded the new material bootstrap css and wanted to use it in my jekyll blog. After setting up and running the jekyll serve -w
to compile the site locally, the console returned this error
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/main.scss': Invalid CSS after "...x-highlighting"": expected selector or at-rule, was ""bootstrap"" on line 49
After searching for a while, it seems as if I am the only one facing this issue. What am I doing wrong?
Upvotes: 8
Views: 21681
Reputation: 2334
You can trace same problem in your local pc as below
bundle exec jekyll build --trace
then fix problem and push
Upvotes: 0
Reputation: 91
In github Pages, set main folder to /(root), not docs. Hope it works
Upvotes: 8
Reputation: 5474
This error is usually thrown when there is a typo or malformed CSS string in one of the *.sass
files.
The error returned during the build is pointing to the issue. Just have in mind that the given line in the error is the one in bundled output css file: _site/css/main.css
.
Using --trace
might help further investigate in some cases. i.e.:
bundle exec jekyll build --trace
Upvotes: 0
Reputation: 1060
You can also check if you're starting the server in the right directory, in my case, I spend 1 hour trying to start the server in the wrong directory :(
Upvotes: 2
Reputation: 510
Turns out this was caused by an omitted comma after one of my import statements
@import
"base",
"layout",
"syntax-highlighting",
"bootstrap";
Hope this saves someone else some time.
Upvotes: 6