-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.rb
87 lines (67 loc) · 2.3 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
######################################################################
# General settings.
######################################################################
# Meta.
set :meta, {
title: 'Foo',
url: 'http://foo.com',
}
# Syntax highlighting.
activate :syntax
set :syntax_theme, Rouge::Themes::Base16
# Change to your Google Analytics key (e.g. UA-XXXXXXXX-Y).
# To disable GA, leave unset or set to nil
# Code will only be injected in build environment
# TODO: extract to MM extension
set :ga_key, 'UA-XXXXXXX-Y'
# Change to your Disqus shortname.
# To Disable Disqus, leave unset or set to nil
# TODO: extract to MM extension
set :disqus_shortname, nil
# Locations.
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
set :partials_dir, 'partials'
after_configuration do
# Add bower's directory to sprockets asset path.
@bower_config = JSON.parse(IO.read("#{root}/.bowerrc"))
sprockets.append_path File.join "#{root}", @bower_config["directory"]
end
# Ignores.
ignore '/calendar.html'
######################################################################
# Blog settings.
######################################################################
Time.zone = "Amsterdam"
activate :blog do |blog|
blog.prefix = 'blog'
blog.permalink = '{year}/{title}.html'
blog.taglink = "tags/{tag}.html"
blog.default_extension = ".md"
blog.paginate = true
blog.per_page = 10
end
# Enable XML feed. Don't forget to edit feed.xml.builder first.
# page "/feed.xml", layout: false
######################################################################
# Development environment.
######################################################################
configure :development do
activate :livereload, apply_js_live: false, apply_css_live: false
end
######################################################################
# Build environment.
######################################################################
configure :build do
activate :relative_assets
activate :directory_indexes
activate :asset_hash
set :relative_links, true
# Ensmallen assets
activate :minify_html, remove_input_attributes: false
activate :minify_css
activate :minify_javascript
activate :gzip, exts: %w(.js .css .html .htm .svg .ttf .otf .woff .eot)
end