lib/gollum-site/site.rb in gollum-site-0.0.2 vs lib/gollum-site/site.rb in gollum-site-0.0.3

- old
+ new

@@ -1,7 +1,11 @@ module Gollum class Site + def self.default_layout_dir() + ::File.join(::File.dirname(::File.expand_path(__FILE__)), "layout") + end + attr_reader :output_path def initialize(wiki, options = {}) @wiki = wiki @output_path = options[:output_path] || "_site" @@ -33,15 +37,15 @@ end list end if layouts["."].nil? and @include_default_layout - dir = ::File.dirname(::File.expand_path(__FILE__)) - default_layout = ::File.join(dir, "layout", "_Layout.html") + dir = Gollum::Site.default_layout_dir() + default_layout = ::File.join(dir, "_Layout.html") layout = ::Liquid::Template.parse(IO.read(default_layout)) layouts["."] = layout - css = ::File.join(dir, "layout", "css") - javascript = ::File.join(dir, "layout", "javascript") + css = ::File.join(dir, "css") + javascript = ::File.join(dir, "javascript") FileUtils.cp_r([css, javascript], @output_path) end items.each do |item| if item.is_a?(@wiki.page_class)