<%
pages = sitemap.resources.find_all { |p| p.source_file.match(/\.md/) }
entries = []

pages.each_with_index do |page, index|
  object = {}
    entry = {
      :id    => index,
      :title => retrieve_page_header(page),
      :url   => page.url,
      :content => page.render({:layout => false })
    }
  entries << entry
end
%>
<%= entries.to_json %>

<%
pages = sitemap.resources.find_all do |p|
  p.source_file.match(/\.md/) if p.source_file
end
entries = []

pages.each_with_index do |page, index|
  object = {}
    entry = {
      :id    => index,
      :title => retrieve_page_header(page),
      :url   => page.url,
      :content => page.render({:layout => false })
    }
  entries << entry
end
%>
<%= entries.to_json %>

Allow guides nav to be used without a title
Allow guides nav to be used without a title

This was raising an error in the middleman console
