-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
42 lines (35 loc) · 884 Bytes
/
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
require "lib/image_helpers"
helpers ImageHelpers
helpers do
def custom_page_classes
if yield_content(:page_classes) != nil
page_classes.gsub("_", "-") + " " + yield_content(:page_classes)
else
page_classes.gsub("_", "-")
end
end
end
page "/*.xml", layout: false
page "/*.json", layout: false
page "/*.txt", layout: false
activate :directory_indexes
activate :asset_hash, :exts => [".css", ".js"]
# Root templates
%w[
index
].each_with_index do |name|
proxy "/#{name}.html", "/templates/root/#{name}.html", ignore: true
end
# Development
configure :development do
set :canonical, "http://localhost:4567"
end
configure :build do
set :canonical, "https://benhays.me"
activate :minify_css
activate :minify_javascript
activate :gzip
activate :autoprefixer do |config|
config.browsers = ["last 3 versions", "Explorer >= 10"]
end
end