-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.rb
61 lines (48 loc) · 1.09 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
helpers do
def locale_root(locale)
locale = locale.to_s
if locale == "en"
"/"
else
"/#{locale}/"
end
end
def reverse_locale(locale)
locale = locale.to_s
if locale == "fr"
"en"
else
"fr"
end
end
end
# Old website redirects
redirect "en/index.html", to: "/"
activate :deploy do |deploy|
deploy.build_before = true
deploy.method = :git
end
# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end
activate :i18n
activate :directory_indexes
set :css_dir, "assets/stylesheets"
set :js_dir, "assets/javascripts"
set :images_dir, "assets/images"
set :fonts_dir, "assets/fonts"
set :documents_dir, "assets/documents"
# Change Compass configuration
compass_config do |config|
config.output_style = :compact
end
# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
activate :minify_css
# Minify Javascript on build
activate :minify_javascript
# Enable cache buster
activate :asset_hash
end