2

Is it possible to use Susy with Jekyll? If so, how?

I tried adding 'susy' to my Gemfile and bundle install'ing, then adding susy to my gems array in config.yml:

// _config.yml
...
gems:
  - 'jekyll-compass'
  - 'susy'

and following the instructions in Jekyll's docs, placing @import 'susy' in my /css/style.scss file. However, I get an error:

File to import not found or unreadable: susy.

Sam Selikoff
  • 12,366
  • 13
  • 58
  • 104

2 Answers2

2

jekyll-compass lets you configure Compass. There's more info in its readme, but for susy I just needed to add a _data/compass.yml file, and add

require:
  - susy

to it.

Also, jekyll-compass expects your main entry style.scss to be under _sass, not css (like Jekyll's out of the box sass support does). I'm sure this is configurable as well.

Sam Selikoff
  • 12,366
  • 13
  • 58
  • 104
  • Did you manage to find a way to keep style.scss under css folder and not _sass? – Samuel Jan 13 '15 at 15:14
  • no :/ you can see my project here: https://github.com/samselikoff/samselikoff.github.io – Sam Selikoff Jan 14 '15 at 14:26
  • Thanks, this is super helpful! How come you've deleted your [dir configurations](http://i.imgur.com/0OAg3Im.png) in your compass.yml file?? – Samuel Jan 14 '15 at 15:32
  • I think I just went with the defaults and put my stylesheets in _compass?? honestly I can't remember right now lol – Sam Selikoff Jan 14 '15 at 17:23
0

If you're willing to install susy with bower, you can just symlink the files under bower_components/susy/sass to the _sass directory (ln -s bower_components/susy/sass/* _sass. I have a fairly minimal working example on GitHub.

The CSS is generated properly and served here for now (though that link will hopefully rapidly become out of sync with the git commit referenced above).

Dav Clark
  • 1,430
  • 1
  • 13
  • 26