-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconfig.rb
64 lines (51 loc) · 1.57 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
# View Middleman configurations:
# http://localhost:4567/__middleman/config/
# Site Settings
# ----------------------------------------------
@google_analytics = "UA-XXXXXXX-X"
# Slim HTML
# ----------------------------------------------
::Slim::Engine.set_options :format => :html
# i18n
# ----------------------------------------------
activate :i18n, :mount_at_root => :'en'
# Livereload
# ----------------------------------------------
configure :development do
activate :livereload, :no_swf => true
end
# Webpack
# ----------------------------------------------
activate :external_pipeline,
name: :webpack,
command: build? ? "yarn run build" : "yarn run start",
source: ".tmp/dist",
latency: 1
# Configure assets directories
# ----------------------------------------------
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
# Other configurations
# ----------------------------------------------
set :trailing_slash, false
# Sitemap
# ----------------------------------------------
page "/sitemap.xml", :layout => false
# Development-specific configuration
# ----------------------------------------------
configure :development do
activate :directory_indexes
set :debug_assets, true
# Output a pretty html
::Slim::Engine.set_options :pretty => true
end
# Build-specific configuration
# ----------------------------------------------
configure :build do
# Use relative URLs
activate :directory_indexes
# Add asset fingerprinting to avoid cache issues
activate :asset_hash
end