This is part of a blog post series that I'm writing called Advanced Jekyll which you can find on [my website, bilaw.al][site].
You can read the blog post [Building API's in Jekyll by clicking here][post].
All the code in this gist is what I use to build API's with in Jekyll.