bin/ghp in ghp-0.0.4 vs bin/ghp in ghp-0.0.5

- old
+ new

@@ -1,14 +1,19 @@ #!/usr/bin/env ruby # encoding: utf-8 # taken from nanoc version 3.5.0b2 +# load Markdown parser +require 'redcarpet' + # Load nanoc require 'nanoc' require 'nanoc/cli' +include Nanoc::Helpers::Rendering + module Nanoc class Site def load_code_snippets @code_snippets_loaded ||= false return if @code_snippets_loaded @@ -22,9 +27,27 @@ ) end # Execute code snippets @code_snippets.each { |cs| cs.load } + end + end +end + +module Nanoc::DataSources + module Filesystem + def items + ghp_config = Nanoc::Site.new('.').config + alt_content = ghp_config[:alt_content] || "content" + alt_dir = (["./lib"] + $:).collect {|x| File.join(File.expand_path("..", x), alt_content) }.select {|x| File.directory? x }[0] + load_objects(alt_dir, 'item', Nanoc::Item) + end + + def layouts + ghp_config = Nanoc::Site.new('.').config + alt_layouts = ghp_config[:alt_layouts] || "layouts" + alt_dir = (["./lib"] + $:).collect {|x| File.join(File.expand_path("..", x), alt_layouts) }.select {|x| File.directory? x }[0] + load_objects(alt_dir, 'layout', Nanoc::Layout) end end end # Run base