-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
39 lines (36 loc) · 1.35 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// Hatch.js is a CMS and social website building framework built in Node.js
// Copyright (C) 2013 Inventures Software Ltd
//
// This file is part of Hatch.js
//
// Hatch.js is free software: you can redistribute it and/or modify it under
// the terms of the GNU Affero General Public License as published by the Free
// Software Foundation, version 3
//
// Hatch.js is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.
//
// See the GNU Affero General Public License for more details. You should have
// received a copy of the GNU General Public License along with Hatch.js. If
// not, see <http://www.gnu.org/licenses/>.
//
// Authors: Marcus Greenwood, Anatoliy Chakkaev and others
//
var compound = require('compound');
module.exports = function (c) {
var contentTypes = {
blogpost: {
icon: 'align-left',
view: __dirname + '/content/blogpost.ejs',
editForm: __dirname + '/content/blogpost-form.ejs'
}
};
Object.keys(contentTypes).forEach(function (key) {
var type = contentTypes[key];
c.hatch.contentType.registerContentType(key, type);
c.hatch.page.register(key, require('./specials/' + key));
});
return compound.createServer({root: __dirname});
};