lib/awestruct/rack/generate.rb in awestruct-0.5.6 vs lib/awestruct/rack/generate.rb in awestruct-0.5.7.RC1

- old
+ new

@@ -12,19 +12,19 @@ generate = false req_path = env['REQUEST_PATH'] path = req_path - path = req_path + "index.html" if req_path.end_with? '/' + path = req_path + 'index.html' if req_path.end_with? '/' page = engine.site.pages_by_output_path[path] if page.nil? and !req_path.end_with? '/' - path = req_path + "/index.html" + path = req_path + '/index.html' page = engine.site.pages_by_output_path[path] end - if !page.nil? - generate_path = File.join( engine.site.config.output_dir, page.output_path ) + unless page.nil? + generate_path = File.join(engine.site.config.output_dir, page.output_path) generate = true if page.stale_output? generate_path generate = true if path.end_with? '.html' end