lib/stack/template.rb in stack-0.0.7 vs lib/stack/template.rb in stack-0.0.8

- old
+ new

@@ -35,19 +35,32 @@ _payload = template_payload.deep_merge(_payload) layout_name = _payload[:layout] if (layout_name and do_layout) + if !self.generator.layouts[layout_name] + puts "The layout `#{layout_name}` does not exist in `_layouts`." + exit + end + # get layout _tpl_payload = self.generator.layouts[layout_name].template_payload _tpl_payload.delete(:layout) _tpl_payload.delete(:template) _tpl_payload.delete(:generator) #puts _tpl_payload.inspect #puts "\n" _payload = _payload.merge(_tpl_payload) + end + + # here we have the payload + # look for the permalink? + permalink = _payload[:permalink] + + if (permalink) + self.path = permalink end #puts _payload.inspect #puts "\n\n" \ No newline at end of file