-
Notifications
You must be signed in to change notification settings - Fork 9
/
config.rb
65 lines (53 loc) · 1.42 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
activate :deploy do |deploy|
deploy.method = :git
committer_app = "#{Middleman::Deploy::PACKAGE} v#{Middleman::Deploy::VERSION}"
commit_message = "Deployed using #{committer_app}"
deploy.commit_message = commit_message
end
set :build_dir, "docs/"
set :site_name, "ROSS conf"
set :analytics_code, "UA-60869001-1"
activate :directory_indexes
activate :blog do |blog|
blog.prefix = "blog"
blog.layout = "blog"
blog.permalink = "{year}-{month}/{title}/index.html"
end
configure :development do
activate :disqus do |d|
d.shortname = "rossconfdev"
end
end
configure :build do
activate :disqus do |d|
d.shortname = "rossconf"
end
end
# We'll leave this here as an example of how to proxy something
#
#data.events.each do |city, event|
#proxy "event/#{city.downcase}/index.html", "/event.html", :locals => { :event => event }
#end
configure :development do
activate :livereload
end
helpers do
def md2(source)
Tilt::KramdownTemplate.new { source.presence || "" }.render
end
end
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
sprockets.append_path File.join root, 'bower_components'
configure :build do
activate :minify_css
activate :minify_javascript
activate :asset_hash
activate :relative_assets
end
helpers do
def blog_post_image(article, name)
"/blog/#{article.date.year}-#{article.date.strftime('%m')}-#{article.slug}/#{name}"
end
end