Sha256: dd7f9acf1d53f36fed8021a6a4f12ef3a11ba6719c735ac48f21f16bd4a0cdd0
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
#!/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 @code_snippets_loaded = true # Get code snippets @code_snippets = Dir['lib/nanoc/**/*.rb'].sort.map do |filename| Nanoc::CodeSnippet.new( File.read(filename), filename ) 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 Nanoc::CLI.run(ARGV)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ghp-0.0.5 | bin/ghp |