Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with SCSS generation in Jekyll 2.0

I have my project laid out like so:

-Project
  -css
    -import.scss
    -_sass/
      main.scss

The contents of import.scss are:

---
---

@import "main.scss";

What I expected to happen was for main.scss to be imported into import.scss, then, import.scss would compile to import.css within the genrated _site/ directory.

Instead, I get the following error

Conversion error: There was an error converting 'css/import.scss'.
jekyll 2.0.3 | Error:  Invalid CSS after "-": expected number or function, was "--"

I'm guessing it's complaining about the YAML front-matter at the top of import.scss, but I'm unsure what the solution is.

like image 844
John Sheridan Avatar asked May 10 '14 19:05

John Sheridan


1 Answers

I had the same error, but here was my fix: use the “---” YAML front-matter only on the /css/*.scss files (e.g. your import.scss), but not on the partials.

The error seems to be referring to front-matters in the partials (/_scss) files. Once I took though out, the Sass started compiling again.

Hope this helps!

like image 52
William Hawke Bassignani Avatar answered Oct 18 '22 09:10

William Hawke Bassignani