0.01
No commit activity in last 3 years
No release in over 3 years
Middleman Extension that generates JSON and XML endpoints
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.2.0
 Project Readme

Middleman API

Build Status Dependency Status

Create JSON and XML endpoints generated from template frontmatter and content.

Installation

Bundle with your Gemfile:

gem "middleman-api"

Or install the standalone Gem:

gem install "middleman-api"

Usage

Activate the extension in your config.rb:

activate :api

The extension will then look over each template in the sitemap and proxy frontmatter and content to JSON and XML endpoints.

JSON

{
  "meta": {
    "title" : "Middleman",
    "foo" : "bar"
  },
  "path" : "/index.html",
  "content" : "..."  
}

XML

<hash>
  <meta>
    <title>Middleman</title>
    <foo>bar</foo>
  </meta>
  <path>/index.html</path>
  <content>
    ...
  </content>
</hash>

Contributing

If there is any thing you'd like to contribute or fix, please:

  • Fork the repo
  • Make your changes
  • Add Cucumber tests for any new functionality
  • Verify all existing tests work properly
  • Make a pull request

The Cucumber features for this project assume the gem is installed, so to make any changes you will need to build and install the gem locally with your changes.

License

The middleman-api gem is Copyright 2013 Jordan Andree, distributed under the MIT License.