Skip to content

Instantly share code, notes, and snippets.

@emory
Forked from parkr/generator_scss.rb
Created August 11, 2012 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emory/3325700 to your computer and use it in GitHub Desktop.
Save emory/3325700 to your computer and use it in GitHub Desktop.
Jekyll Plugin to output SCSS without requiring the "---" YAML Front Matter
#
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment