-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsite.js
42 lines (34 loc) · 1.01 KB
/
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
41
42
var kerouac = require('kerouac');
var site = kerouac();
site.set('base url', 'http://www.locomotivejs.org/');
site.set('output', 'www');
site.engine('ejs', require('ejs-locals'));
site.content('content');
site.static('public');
site.page('/sitemap.xml', require('kerouac-sitemap')());
site.page('/robots.txt', require('kerouac-robotstxt')());
site.page('/CNAME', require('kerouac-cname')());
/**
* .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;
}
});