KapowCMS
Very simple cms tool with admin and static generated html files stored in Redis.
Fast, safe, simple!
Prerequisite
- Node
- Redis installed and running
Install
Create a new npm project and add kapowcms as a dependency:
$ npm init$ npm install kapowcms --save
Then copy database file (you can then open it and edit if you'd like):
$ cp node_modules/kapowcms/db.example.json db.json
Create file index.js with content:
globalappRoot = __dirname; const kapowcms = ; kapowcms;
Port
You can also set what port to run KapowCMS from by giving it as a parameter to the run method. Default is 3000.
kapowcms;
Run
$ node index.js
Plugins
Add plugin by adding it as a npm dependency, for example:
$ npm install kapowcms-disqus --save
And then add it to the array in the run method in your index.js:
globalappRoot = __dirname; const kapowcms = ; kapowcms;
Create new theme
- Copy /node_modules/kapowcms/themes/default to /themes/xxx
- Update theme in db.json
- Go to admin and save some post to regenerate all posts
Examples
For every template option you can check /node_modules/kapowcms/themes/example
Templates
Every template not starting with an underscore in it's filename will be available as a template for posts. Every template will by default have a title and a content field.
You can set template settings if you create a .json file with the same name as the template. The following options are available:
name
The name of the template
fields
Array of custom fields for the template. Every field takes the following options:
id
Id of field
name
Name of field
type
Type of field. The following types are currently supported:
- text
- image
- select
- multipleselect
exclude
Array of fields to exclude