-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.rb
87 lines (69 loc) · 2.17 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
activate :blog do |blog|
blog.default_extension = '.md'
blog.permalink = '{title}'
blog.sources = 'articles/{year}-{month}-{day}-{title}.html'
blog.layout = 'article'
blog.tag_template = 'tag.html'
blog.paginate = true
blog.per_page = 5
end
activate :search do |search|
search.resources = ['articles/']
search.index_path = 'search/lunr-index.json' # defaults to `search.json`
search.fields = {
title: { boost: 100, store: true, required: true },
content: { boost: 50 },
url: { index: false, store: true },
author: { boost: 30 }
}
end
page '/feed.xml', layout: false
# Add bower's directory to sprockets asset path
after_configuration do
sprockets.append_path File.join "#{root}", 'bower_components'
Dir.glob('./bower_components/bootstrap/fonts/**/*').each do |file|
sprockets.import_asset(file.split('/')[2..-1].join('/')) do |logical_path|
Pathname.new('fonts') + logical_path.split.last
end
end
end
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
set :partials_dir, 'partials'
set :markdown_engine, :redcarpet
set :markdown, fenced_code_blocks: true, smartypants: true, tables: true
activate :automatic_image_sizes
activate :directory_indexes
activate :syntax
activate :meta_tags
activate :disqus do |d|
d.shortname = 'kevinjalbert'
end
configure :development do
set :root_url, 'http://kevinjalbert.dev'
activate :livereload
end
configure :build do
set :root_url, 'https://kevinjalbert.com'
# Allowing the .well-known directory to pass-through
# https://github.com/middleman/middleman/issues/1243#issuecomment-39356604
config.ignored_sitemap_matchers[:source_dotfiles] = proc { |file|
file =~ %r{/\.} && file !~ %r{/\.(well-known|htaccess|htpasswd|nojekyll)}
}
# Not really useful when serving from Github Pages
#activate :gzip
#activate :asset_hash
activate :asset_host
activate :minify_css
activate :minify_html
#activate :minify_javascript
#activate :imageoptim do |options|
#options.manifest = false
#options.skip_missing_workers = true
#options.nice = true
#options.threads = true
#options.pngout = false
#options.svgo = false
#end
end