-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
98 lines (70 loc) · 2.08 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
# Methods defined in the helpers block are available in templates
# Use LiveReload
activate :i18n
activate :livereload
activate :portfolio do |f|
# # thumbnail width (px)
f.thumbnail_width = 300
# # thumbnail height (px)
f.thumbnail_height = 300
# f.thumbnail_class ""
f.thumbnail_link_class = "swipebox thumbnail"
# override default portfolio template (must be located in source/)
f.portfolio_template= "portfolio.html.haml"
# override default project template (also must be in source/)
f.project_template= "project.html.haml"
end
activate :middleman_simple_thumbnailer
# Compass configuration
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :partials_dir, 'partials'
set :fabphoto, {
author: {
name: 'Fabien',
bio: 'Developer by day, fighter and cook by night',
location: 'Berlin',
website: "http://blog.fabbook.fr", # Optional
gravatar_email: '[email protected]' # Optional
}
}
activate :directory_indexes
set :url_root, 'http://fabphoto.fr'
activate :search_engine_sitemap
config = YAML.load ERB.new(File.read('parameter.yml')).result(binding)
###
# Helpers
###
activate :deploy do |deploy|
deploy.method = :ftp
deploy.host = config['FTP_HOST']
deploy.user = config['FTP_USER']
deploy.password = config['FTP_PASSWORD']
deploy.path = config['path']
deploy.build_before = false # default: false
end
# Build-specific configuration
configure :build do
ignore 'project.html'
ignore 'images/*.psd'
ignore 'stylesheets/lib/*'
ignore 'stylesheets/vendor/*'
ignore 'javascripts/lib/*'
ignore 'javascripts/vendor/*'
# For example, change the Compass output style for deployment
activate :minify_css
# Minify Javascript on build
activate :minify_javascript
activate :imageoptim
# Enable cache buster
# activate :cache_buster
# Use relative URLs
# activate :relative_assets
# Compress PNGs after build
# First: gem install middleman-smusher
# require "middleman-smusher"
# activate :smusher
# Or use a different image path
# set :http_path, "/Content/images/"
end