Skip to content

amccloud/darkmatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Darkmatter

YAML Front Matter for Rails.

Installation

Add this line to your application's Gemfile:

gem 'darkmatter'

Usage

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>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

YAML Front Matter for Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%