forked from schme/HandmadeCompanion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocpad.coffee
40 lines (33 loc) · 1.36 KB
/
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
32
33
34
35
36
37
38
39
40
# DocPad Configuration File
# http://docpad.org/docs/config
# Define the DocPad Configuration
docpadConfig = {
collections:
videoPages: ->
@getCollection("html").findAllLive({relativeOutDirPath: {$beginsWith: "videos"}}).on "add", (model) ->
model.setMetaDefaults({layout:"video"})
templateData:
site:
title: "Handmade Companion"
root_url: "https://hero.handmadedev.org"
guide_url: "https://hero.handmadedev.org/jace/guide/"
resources_url: "https://hero.handmadedev.org/jace/resources/"
thanks_url: "https://hero.handmadedev.org/jace/thanks/"
rootPath: ->
if process.env["HOSTROOT"]?
"/#{process.env["HOSTROOT"]}"
else
""
addSheet: (src)->
@document.sheets = [] unless @document.sheets?
@document.sheets.push(src) unless src in @document.sheets
sheetLink: (href)->
"<link rel='stylesheet' type='text/css' href='#{href}' />"
addScript: (src)->
@document.scripts = [] unless @document.scripts?
@document.scripts.push(src) unless src in @document.scripts
scriptLink: (src)->
"<script type='text/javascript' src='#{src}'></script>"
}
# Export the DocPad Configuration
module.exports = docpadConfig