-
Notifications
You must be signed in to change notification settings - Fork 50
/
docpad.js
69 lines (55 loc) · 1.57 KB
/
docpad.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = {
// -- Basic information ----------------------------------------------------
templateData: {
// Production
site: {
name: "BrazilJS",
description: "Uma fundação sem fins lucrativos com a missão de mover e unir a comunidade de JavaScript no Brasil.",
url: "http://braziljs.org"
}
},
// -- Collections ------------------------------------------------------------
collections: {
// Get all projects sorted by alphabetical order
projects: function() {
var documents = this.getCollection("documents");
var sortByAscendingTitle = [{ title: 1 }];
return documents.findAll({
url: {
$startsWith: '/projetos'
}
}, sortByAscendingTitle);
},
// Get all projects sorted by date order
blogposts: function() {
var documents = this.getCollection("documents");
var sortByAscendingDate = [{ date: -1 }];
return documents.findAll({
url: {
$startsWith: '/blog'
},
layout: 'blog',
}, sortByAscendingDate);
}
},
// -- Environments -----------------------------------------------------------
environments: {
// Development
development: {
templateData: {
site: {
url: "http://localhost:9778"
}
}
}
},
// -- Plugins ----------------------------------------------------------------
plugins: {
moment: {
formats: [
{ raw: 'date', format: 'D', formatted: 'day' },
{ raw: 'date', format: 'MMM', formatted: 'month' }
]
}
}
};