Skip to content

Instantly share code, notes, and snippets.

@dhulihan
Last active December 16, 2015 01:49
Show Gist options
  • Save dhulihan/5357990 to your computer and use it in GitHub Desktop.
Save dhulihan/5357990 to your computer and use it in GitHub Desktop.
Jekyll Compass Plugin for hooligan theme.
# _plugins/compass.rb
#
# Jekyll Generator for SCSS
#
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Config file placed in ./_sass/config.rb
# Place .scss files in ./_scss/sass unless changed in config.rb
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
#
require 'sass'
require 'pathname'
require 'compass'
require 'compass/exec'
module Jekyll
class CompassGenerator < Generator
safe true
def generate(site)
Dir.chdir File.expand_path('../', File.dirname(__FILE__)) do
Compass::Exec::SubCommandUI.new(%w(compile)).run!
end
end
end
end
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "assets/themes/hooligan/css"
sass_dir = "assets/themes/hooligan/_sass"
images_dir = "images"
javascripts_dir = "javascripts"# Require any additional compass plugins here.
source :rubygems
gem "compass"
gem "sass"
gem "jekyll"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment