Frontmatter is a way to add meta data to your pages and access it form templates and the sitemap. Consider the following page:

title: Apollo 40th anniversery
layout: video

Check out this apollo launch video! Crazy how we went from nothing to the moon in under a decade.

With a respective video.html.haml layout:


The power of Frontmatter is its abililty to query the data programatically from other templates. For example, if we have several video pages in our site, we could query them via the Site:

title: Youtube videos
%ul{ |r|["video_url"] =~ /youtube/ }.each do |page|
    %a{href: page.request_path}["title"]