-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
46 lines (39 loc) · 1.07 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
###
# Settings
###
set :site_title, "Red Hat OpenStack Commons"
set :site_url, 'https://commons.openshift.org/'
set :openshift_assets, 'https://assets.openshift.net/content'
###
# Assets
###
set :css_dir, 'css'
set :fonts_dir, 'fonts'
set :images_dir, 'img'
set :js_dir, 'js'
# activate asset hashing to prevent obsolete cached assets be used
activate :asset_hash
###
# Page command
###
page "/sitemap.xml", layout: false
###
# Generating individual dynamic Gathering pages from template
###
data.gatherings.gatherings.each do |gathering|
if gathering.menu.presence
proxy "/gatherings/#{gathering.name.gsub(" ","_")}.html", "/gatherings/template.html", :locals => { :gathering => gathering }, :ignore => true
end
end
# Development-specific configuration
configure :development do
activate :php
end
# Build-specific configuration
configure :build do
config.ignored_sitemap_matchers[:source_dotfiles] = proc { |file|
file =~ %r{/\.} && file !~ %r{/\.(s2i|openshift|htaccess|htpasswd|nojekyll|git)|containers}
}
activate :minify_css
activate :minify_javascript
end