lib/compiler.rb in nanoc-1.1.1 vs lib/compiler.rb in nanoc-1.1.2
- old
+ new
@@ -14,10 +14,10 @@
def run
Dir['lib/*.rb'].each { |f| require f }
pages = compile_pages(uncompiled_pages)
pages.each do |page|
- content = File.read("layouts/#{page[:layout]}.erb").eruby(page.merge({ :page => page, :pages => pages })) # fallback for nanoc 1.0
+ content = page[:layout].nil? ? "<%= @page[:content] %>" : File.read("layouts/#{page[:layout]}.erb").eruby(page.merge({ :page => page, :pages => pages })) # fallback for nanoc 1.0
FileManager.create_file(path_for_page(page)) { content }
end
end
private