-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.rb
44 lines (36 loc) · 1 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
# Page options, layouts, aliases and proxies
Time.zone = "UTC"
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
page "/animated-hero.html", layout: false
# General configuration
configure :development do
activate :livereload
activate :syntax
end
configure :build do
activate :syntax
activate :minify_css
activate :minify_javascript
activate :directory_indexes
activate :asset_hash
# Rename a file to enable Netlify redirects
after_build do |builder|
src = File.join(config[:source],"netlify_redirects")
dst = File.join(config[:build_dir],"_redirects")
builder.thor.source_paths << File.dirname(__FILE__)
builder.thor.copy_file(src,dst)
end
end
# Helpers
set :haml, { :ugly => true, :format => :html5 }
set :markdown_engine, :redcarpet
set :markdown, {
:no_intra_emphasis => true,
:autolink => true,
:strikethrough => true,
:fenced_code_blocks => true,
:tables => true,
:with_toc_data => true }
set :relative_links, true