lib/compiler.rb in nanoc-1.0 vs lib/compiler.rb in nanoc-1.0.1
- old
+ new
@@ -26,10 +26,11 @@
# Require files in lib/
Dir.glob('lib/*.rb').each { |f| require f }
# Compile pages
- pages = compile_pages(uncompiled_pages)
+ pages = uncompiled_pages.sort { |x,y| x[:order].to_i <=> y[:order].to_i }
+ pages = compile_pages(pages)
# Put pages in their layout
pages.each do |page|
content_with_layout = layout_for_page(page).eruby(page.merge({ :pages => pages }))
FileManager.create_file(path_for_page(page)) { content_with_layout }