# | |
# Jekyll Generator for SCSS | |
# | |
# (File paths in this description relative to jekyll project root directory) | |
# Place this file in ./_plugins | |
# Place .scss files in ./_scss | |
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config | |
# Config file placed in ./_sass/config.rb | |
# | |
require 'sass' | |
require 'pathname' | |
require 'compass' | |
require 'compass/exec' | |
module Jekyll | |
class CompassGenerator < Generator | |
safe true | |
def generate(site) | |
Dir.chdir File.expand_path('../_sass', File.dirname(__FILE__)) do | |
Compass::Exec::SubCommandUI.new(%w(compile)).run! | |
end | |
end | |
end | |
end |
This comment has been minimized.
This comment has been minimized.
jwebcat
commented
Mar 29, 2013
how do you get this to compile into the _site folder? What are your config.rb compass settings? |
This comment has been minimized.
This comment has been minimized.
pauljz
commented
Apr 5, 2013
@jwebcat here's an example config.rb that seems to be working for me:
|
This comment has been minimized.
This comment has been minimized.
Grandrath
commented
Jan 6, 2014
I noticed the following problem with this plugin: Jekyll calls the generators after it assembled a list of all the files that need to be copied to I updated this plugin to notify Jekyll about the generated files: https://gist.github.com/Grandrath/8282339 |
This comment has been minimized.
This comment has been minimized.
jimyuan
commented
Feb 13, 2015
Hi, I use this plug-in and use a 3rd mixin for css sprits, but I always got error |
This comment has been minimized.
This comment has been minimized.
foxx
commented
Apr 12, 2017
•
To use this, you need to add
|
This comment has been minimized.
matthodan commentedDec 18, 2012
Very cool use of compass. Have you seen Jekyll Asset Pipeline? It has a similar workflow and supports both CSS and JS conversion.