-
Notifications
You must be signed in to change notification settings - Fork 3
/
docpad.coffee
31 lines (29 loc) · 843 Bytes
/
docpad.coffee
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
_ = require('underscore')
pages = require('./config/pages')()
presentations = require('./config/presentations')()
collections = require('./config/collections')()
handlebars = require('./config/handlebars')()
docpadConfig =
templateData:
site:
title: "Coding the Humanities"
presentations: presentations.templateData
pages: pages.all
getAsJson: (sth) ->
c = @getCollection(sth)
JSON.stringify(c)
getTopicsAsJSON: ->
c = @getCollection('learnTopics').map (r) ->
r = r.pick('name', 'difficulty_level', 'resources')
count = 0
for k,v of r.resources
count += v.length
r.resourceCount = count
r
JSON.stringify(c)
collections: collections.all
plugins:
handlebars: handlebars
nodesass:
neat: true
module.exports = docpadConfig