forked from ffddorf/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
54 lines (47 loc) · 1.05 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
# use Compass for advanced CSS
compass_config do |config|
config.output_style = :compact
end
helpers do
def nav_li(text, url)
trailurl = url
trailurl += '/' unless url == '/'
if trailurl == current_page.url
active = 'active'
end
content_tag :li, class: active do
link_to(text, url)
end
end
end
activate :directory_indexes
activate :data_source do |c|
c.root = "https://images.lambdacore.de/gluon/stable/"
c.files = [
"version.json"
]
end
configure :build do
activate :minify_css
activate :minify_javascript
activate :relative_assets
activate :asset_hash
end
# deploy Netlify redirects file
page 'redirects', :layout => false
after_build do
File.rename 'build/redirects', 'build/_redirects'
end
require 'html-proofer'
after_build do |builder|
begin
HTMLProofer.check_directory(config[:build_dir], {
:assume_extension => true,
:url_ignore => ["http://192.168.0.1", "http://192.168.1.1"],
:empty_alt_ignore => true
}).run
rescue RuntimeError => e
puts e
exit 1
end
end