YAML Front Matter for Rails.
Add this line to your application's Gemfile:
gem 'darkmatter'
The gem parses the YAML Front Matter from your view templates into the @page
instance variable.
View
---
title: Foo
---
Hello World
Layout
<html>
<head>
<title><%= @page[:title] %></title>
</head>
<body>
<%= yield %>
</body>
</html>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request