-
Notifications
You must be signed in to change notification settings - Fork 8
/
SiteConfig.groovy
83 lines (74 loc) · 2.31 KB
/
SiteConfig.groovy
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import com.sysgears.theme.ResourceMapper
import com.sysgears.theme.deploy.GHPagesDeployer
import com.sysgears.theme.taglib.ThemeTagLib
// This setting defines the character encoding of html pages,
// and therefore should match the character encoding of the site files on a filesystem
html_encoding = 'utf-8' // it is passed to the mata charset attribute of the default page layout
// Resource mapper and tag libs.
resource_mapper = new ResourceMapper(site).map
tag_libs = [ThemeTagLib]
features {
highlight = 'pygments' // 'none', 'pygments'
markdown = 'txtmark' // 'txtmark', 'pegdown'
asciidoc {
opts = ['source-highlighter': 'coderay',
'icons': 'font']
}
}
environments {
dev {
log.info 'Development environment is used'
url = "http://localhost:${jetty_port}"
show_unpublished = true
}
prod {
log.info 'Production environment is used'
url = '' // site URL, for example http://www.example.com
show_unpublished = false
features {
minify_xml = false
minify_html = false
minify_js = false
minify_css = false
}
}
cmd {
features {
compass = 'none'
highlight = 'none'
}
}
}
python {
interpreter = 'jython' // 'auto', 'python', 'jython'
//cmd_candidates = ['python2', 'python', 'python2.7']
//setup_tools = '2.1'
}
ruby {
interpreter = 'jruby' // 'auto', 'ruby', 'jruby'
//cmd_candidates = ['ruby', 'ruby1.8.7', 'ruby1.9.3', 'user.home/.rvm/bin/ruby']
//ruby_gems = '2.2.2'
}
// Deployment settings.
s3_bucket = '' // your S3 bucket name
deploy_s3 = "s3cmd sync --acl-public --reduced-redundancy ${destination_dir}/ s3://${s3_bucket}/"
gh_pages_url = '' // path to GitHub repository in format [email protected]:{username}/{repo}.git
deploy = new GHPagesDeployer(site).deploy
// Custom commands-line commands.
commands = [
/*
* Creates new page.
*
* location - relative path to the new page, should start with the /, i.e. /pages/index.html.
* pageTitle - new page title
*/
'create-page': { String location, String pageTitle ->
file = new File(content_dir, location)
file.parentFile.mkdirs()
file.exists() || file.write("""---
layout: default
title: "${pageTitle}"
published: true
---
""")}
]