jekyll / jekyll-sass-converter

A Sass converter for Jekyll.

Home Page:http://rubygems.org/gems/jekyll-sass-converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jekyll build error due to name conflict

evanwill opened this issue · comments

The recent v3.0.0 release causes some unexpected issues with many existing Jekyll projects because it causes a build failure when the root scss file has the same base name as one of the sass partials it imports.

For example:
a partial "_sass/_custom.scss" and a main css file "assets/css/custom.scss" that includes @import "custom"; .
With Ruby 3.1, Jekyll 4.3.1, and jekyll-sass-converter 3.0.0, results in fatal error, saying
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/custom.scss': expected "{".

Renaming one of the files solves the issue. Or adding to the Gemfile to use an older version, like gem "jekyll-sass-converter", "< 3.0".

This arrangement of files worked in previous versions of jekyll-sass-converter and the error message was a bit mysterious, so it took a while for me to debug older projects--I am not sure if this is something that should be fixed, but wanted to bring it up since I think others will be impacted.

Okay, Thank you!
I didn't understand that at first. I guess didn't really think of "custom.scss" and "_custom.scss" as the same filename, but they end up being the same in the generator's view of things.