class JekyllBookshop::Styles

Public Class Methods

open_bookshop(site) click to toggle source

Add the paths to find bookshop's styles

# File lib/jekyll-bookshop.rb, line 64
def self.open_bookshop(site)
  bookshop_theme_path = (site.theme ? site.theme.root : site.source) + '/_bookshop'
  bookshop_site_path = site.source + '/_bookshop'
  site.config['bookshop_theme_path'] = Pathname.new(bookshop_theme_path).cleanpath.to_s
  site.config['bookshop_site_path'] = Pathname.new(bookshop_site_path).cleanpath.to_s

  site.config['sass'] ||= {}
  site.config['sass']['load_paths'] ||= []
  site.config['sass']['load_paths'].push(Pathname.new(bookshop_theme_path + '/sass').cleanpath.to_s)
  site.config['sass']['load_paths'].push(Pathname.new(bookshop_site_path + '/sass').cleanpath.to_s)
end