A tasty flat-file CMS backend
- Create a folder called
content
in your app root. - Place the
api
folder in your app root. - Make some Markdowns.
- Give your Markdowns some YAML front matter.
- Save your Markdowns in the content folder. Use whatever directory structure you want, like
/content/posts/my-favorite-things/cats.md
. - Get some JSON from
/api/posts/my-favorite-things/cats/
- Make a frontend, you lazy-ass.
meta
: A JSON object containing the YAML front matter key-value pairs
content
: A string of the Markdown content of your file, converted to HTML
items
: If the request is to a directory, Pancake loads the index.md into meta
and content
and the directory contents into this array of items. Each item is a JSON object with "meta" and "content" keys.
Values are list as (default|accepted).
content=(true|false)
items=(true|false)
with=(all|comma separated list of metadata fields)
without=(none|comma separated list of metadata fields)
sort=(date|fieldName)
order=(asc|desc)