Stancy
Organise your content just using files and folders. Use plural sounding folders to create collections.
Easily deliver content from static folders and files using JSON, YAML, TEXT and Markdown.
Easily asbtract content formatting by processing it on the client. Sort collections, format dates, and parse markdown.
Get and filter data easily using a simple RESTlike API that follows the structure of your folders.
Usage
Create and structure your content. Plural sounding folders will give you a collection.
content/
pages/
home.md
features.md
about.md
site.json
All you need to do, is pass in the source directory of your content and initiate a client.
var client = stancy('content/').client()
To get content, just specify the end point which matches your content structure.
client.get('pages/about').then((res) => console.log(res))
Features
Server and client
Easily serve content from static folders and files, and fetch content.
Plural Folders
Stancy intelligently works out what are collections and what are items. Using a plural sounding folder creates a collection.
Index File
Use an index file inside a folder to create an item and a collection. The files contained inside that folder become children of that item. This is useful if you prefer to organise using folders or if you want to create an index page for a group of related content.
Hidden Files and Folders
Prepend an underscore _
to hide a file or folder. In the case of hiding a folder, this will also hide all it's contents.