Module: Stratus::Generator

Defined in:
lib/stratus/generator.rb,
lib/stratus/generator/builder.rb,
lib/stratus/generator/context.rb,
lib/stratus/generator/scanner.rb,
lib/stratus/generator/renderer.rb

Defined Under Namespace

Classes: Builder, LiquidContext, LiquidRenderer, Scanner

Class Method Summary collapse

Class Method Details

.build(root_path) ⇒ Object



113
114
115
# File 'lib/stratus/generator/builder.rb', line 113

def build(root_path)
  Builder.new(root_path).execute
end

.configObject



3
4
5
# File 'lib/stratus/generator.rb', line 3

def self.config
  ::Stratus.settings[:generator]
end

.page_tree(root_path) ⇒ Object



117
118
119
120
121
122
123
124
125
126
127
# File 'lib/stratus/generator/builder.rb', line 117

def page_tree(root_path)
  builder = Builder.new(root_path)
  builder.sweep_content
  
  Stratus::Resources.collection_types.sort.each do |col_type|
    puts "#{ col_type }/"
    Stratus::Resources.content(:collection_type=>col_type, :sort_by=>:slug).each do |r|
      puts "   #{ r.slug }"
    end
  end
end