CM-Engine
The Content Management Engine for Enginemill.
Installation
CM-Engine is designed to be installed by including it in the package.json
dependencies list for your web project. Follow the
npm documentation for package.json
if you don't already know how to do that.
Once you have it listed in the package.json for your project, just run
npm install
from the root of your project.
Usage
Load CM-Engine into a Node.js module by requiring it.
var CME = require('cm-engine');
Configure and create a handler function and then simply pass it to one of your
Enginemill endpoint definitions.
var cmHandler = CME.createHandler({
template_path: '/path/to/templates'
, content_path: '/path/to/content'
, createContext: function () {
return {
env: 'local'
, cdn: 'http://cdn.example.com'
};
}
});
EM.endpoint({
name: 'Blog'
, route: '/blog/*'
, methods: 'HEAD GET'
, handler: cmHandler
});
Copyright and License
Copyright: (c) 2012 by The Fireworks Project (http://www.fireworksproject.com)
Unless otherwise indicated, all source code is licensed under the MIT license. See MIT-LICENSE for details.