lib/bonsai.rb in bonsai-1.0.1 vs lib/bonsai.rb in bonsai-1.1.0
- old
+ new
@@ -40,17 +40,24 @@
def version
File.read("#{File.dirname(__FILE__)}/../VERSION")
end
+ def site
+ YAML::load(File.read("#{Bonsai.root_dir}/site.yml")) || {}
+ rescue ArgumentError
+ Bonsai.log "Badly formatted site.yml"
+ end
+
private
def is_a_bonsai?(path)
File.directory?("#{path}/content") && File.directory?("#{path}/public") && File.directory?("#{path}/templates")
end
end
autoload :Page, "page"
autoload :Console, "console"
+ autoload :Sitemap, "sitemap"
autoload :Exporter, "exporter"
autoload :Template, "template"
autoload :Generate, "generate"
autoload :Navigation, "navigation"
autoload :PagePresenter, "page_presenter"
\ No newline at end of file