This repository has been archived by the owner on Dec 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
154 lines (127 loc) · 3.79 KB
/
config.rb
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
######################################################################
# General settings.
######################################################################
# Meta.
set :meta, {
title: 'GORUCO',
url: 'http://goruco.com',
}
# Syntax highlighting.
activate :syntax
set :syntax_theme, Rouge::Themes::Base16
# Change to your Google Analytics key (e.g. UA-XXXXXXXX-Y).
# To disable GA, leave unset or set to nil
# Code will only be injected in build environment
# TODO: extract to MM extension
set :ga_key, 'UA-29279606-1'
# Change to your Disqus shortname.
# To Disable Disqus, leave unset or set to nil
# TODO: extract to MM extension
set :disqus_shortname, nil
# Locations.
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
set :partials_dir, 'partials'
after_configuration do
# Add bower's directory to sprockets asset path.
@bower_config = JSON.parse(IO.read("#{root}/.bowerrc"))
sprockets.append_path File.join "#{root}", @bower_config["directory"]
end
# Ignores.
ignore '/calendar.html'
ignore '/feed.xml.builder'
ignore '/.bowerrc'
ignore '/.ruby-version'
######################################################################
# Blog settings.
######################################################################
Time.zone = "US/Eastern"
activate :blog do |blog|
blog.prefix = 'news'
blog.name = 'news'
blog.permalink = '{year}/{title}'
blog.taglink = "tags/{tag}"
blog.default_extension = ".md"
blog.layout = "news"
blog.paginate = true
blog.per_page = 10
end
###########################
## Speakers
###########################
activate :blog do |blog|
blog.name = "speakers"
blog.prefix = 'speakers'
blog.permalink = '{year}/{title}'
blog.taglink = "tags/{tag}"
blog.default_extension = ".md"
blog.layout = "speaker"
blog.paginate = true
blog.per_page = 10
end
(2007..2015).to_a.each do |year|
proxy "/speakers/#{year}/index.html", "/speakers/year.html", locals: { year: year }
end
###########################
## Schedule
###########################
activate :blog do |blog|
blog.name = "schedule"
blog.prefix = 'schedule'
blog.permalink = '{year}/{title}'
blog.taglink = "tags/{tag}"
blog.default_extension = ".md"
blog.paginate = true
blog.per_page = 10
end
###########################
## Organizers
###########################
activate :blog do |blog|
blog.name = "organizers"
blog.prefix = 'organizers'
blog.permalink = '{year}/{title}'
blog.taglink = "tags/{tag}"
blog.default_extension = ".md"
blog.layout = "post"
blog.paginate = true
blog.per_page = 10
end
###########################
## Sponsors
###########################
activate :blog do |blog|
blog.name = "sponsors"
blog.prefix = 'sponsors'
blog.permalink = '{year}/{title}'
blog.taglink = "tags/{tag}"
blog.default_extension = ".md"
blog.layout = "post"
blog.paginate = true
blog.per_page = 10
end
# Enable XML feed. Don't forget to edit feed.xml.builder first.
# page "/feed.xml", layout: false
######################################################################
# Development environment.
######################################################################
configure :development do
activate :livereload, apply_js_live: false, apply_css_live: false
end
######################################################################
# Build environment.
######################################################################
configure :build do
activate :relative_assets
set :trailing_slash, false
activate :directory_indexes
activate :asset_hash
# Ensmallen assets
activate :minify_html, remove_input_attributes: false
activate :minify_css
activate :minify_javascript
# activate :image_optim
activate :gzip, exts: %w(.js .css .html .htm .svg .ttf .otf .woff .eot)
end