def navigation_list(site, page)
      pages = site['pages'].select { |p|
        p.data['navigation'] && p.data['title']
      }.sort_by { |p| p.data['navigation'] }

      list = []
      list << pages.map { |p|
        active = (p.url == page['url']) || (page.key?('next') && File.join(p.dir, p.basename) == '/index')
        navigation_list_item(File.join(site['url'], p.url), p.data['title'], active)
      }
      list.join("\n")
    end
def navigation_list(site, page)
      pages = site['pages'].select { |p|
        p.data['navigation'] && p.data['title']
      }.sort_by { |p| p.data['navigation'] }

      list = []
      list << pages.map { |p|
        active = (p.url == page['url']) || (page.key?('next') && File.join(p.dir, p.basename) == '/index')
        navigation_list_item(File.join(site['url'], p.url), p.data['title'], active)
      }
      list.join("\n")
    end
Returns a, ready to use, navigation list of all pages that have
 <tt>navigation</tt> set in their YAML front matter. The list is sorted by
 the value of <tt>navigation</tt>.

   {{ site | navigation_list:page }}