forked from jaredhanson/www.locomotivejs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.js
40 lines (31 loc) · 957 Bytes
/
site.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
40
var kerouac = require('kerouac');
var site = kerouac();
site.set('base url', 'https://emvc.github.io/emvc/');
site.set('output', 'emvc-guide');
site.engine('ejs', require('ejs-locals'));
site.content('content');
site.static('public');
site.plug(require('kerouac-sitemap')());
site.plug(require('kerouac-robotstxt')());
/**
* .htaccess
*/
;(function() {
var redirect = {
'/guide/architecture.html': '/guide/architecture/',
'/guide/controllers.html': '/guide/controllers/',
'/guide/datastores.html': '/guide/datastores/',
'/guide/directory-structure.html': '/guide/directory-structure/',
'/guide/get-started.html': '/guide/get-started/',
'/guide/routing.html': '/guide/routing/',
'/guide/views.html': '/guide/views/'
}
site.plug(require('kerouac-htaccess')({ redirect: redirect }));
})();
site.generate(function(err) {
if (err) {
console.error(err.message);
console.error(err.stack);
return;
}
});