Skip to content
Transform your content into an API.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
packages
.gitignore
.travis.yml
LICENSE
README.md
lerna.json
package.json
tsconfig.json
yarn.lock

README.md

Contently

Build Status

Contently takes your content and turns it into a consumable API for your JAMstack site. Currently under development, see the roadmap

Goals

  • fast performance
  • highly configurable
  • wide use-case
  • easily approachable

Documentation

Each package has its own documentation:

Examples

Usage with frameworks

Take a look at the following example repos:

Standalone

📦 current working directory
 ┣ 📂 posts
 ┃ ┣ 📄 Hello-World.md
 ┃ ┣ 📄 Second-Post.md
 ┣ 📂 content

yarn add contently contently-source-fs contently-transform-markdown contently-json-api
const Contently = require('contently');
const ContentlySourceFs = require('contently-source-fs');
const ContentlyTransformMarkdown = require('contently-transform-markdown');
const ContentlyJsonApi = require('contently-json-api');

new Contently()
	.use(ContentlySourceFs, { patterns: ['posts/*.md'] })
	.use(ContentlyTransformMarkdown)
	.use(ContentlyJsonApi)
	.run()
	.then(data => console.log('Done!', data));

Which will generate...

📦 current working directory
 ┣ 📂 posts
 ┃ ┣ 📄 Hello-World.md
 ┃ ┣ 📄 Second-Post.md
 ┣ 📂 content
 ┃ ┣ 📄 hello-world.json
 ┃ ┣ 📄 second-post.json

...which you can use with your static site generator! Take a look at a JSON file:

{
	"slug": "hello-world",
	"data": "<h1>Hello World</h1>\n<p>Hello from Contently!</p>\n",
	"attributes": {
		"createdAt": "2019-09-06T11:51:55.052Z",
		"modifiedAt": "2019-09-06T11:51:55.052Z",
		"title": "Hello-World"
	},
	"assets": []
}
You can’t perform that action at this time.