Supersimple plugin for DocPad to send JSON responses
CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
json.plugin.coffee
package.json
readme.md

readme.md

JSON Plugin for Docpad

Supersimple plugin for DocPad to send document meta and content as JSON when requested.

How to use it?

Just place it in your plugins directory and make requests, eg

curl -H "Accept: application/json" http://localhost:9778/

You should get:

{
  meta: {}      // your document's metadata
  content: ""   // your content, not rendered
}