-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
executable file
·63 lines (57 loc) · 1.41 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
require 'slim'
Dir['./*/*.rb'].each { |file| load file }
include FaviconsHelper
# Build-specific configuration
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
set :url_root, @app.data.site.host
activate :tailwind do |config|
config.destination_path = 'source/stylesheets/site.css'
config.css_path = 'source/stylesheets/tailwind.css'
config.config_path = 'tailwind.config.js'
end
activate :livereload
activate :i18n,
mount_at_root: :en,
lang_map: { fr: :acp, de: :solawi }
configure :development do
set :debug_assets, true
end
configure :build do
set :asset_host, @app.data.site.host
set :relative_links, true
activate :asset_hash
activate :directory_indexes
activate :favicon_maker, icons: generate_favicons_hash
activate :gzip
activate :minify_html
activate :search_engine_sitemap
activate :relative_assets
activate :robots,
rules: [{ user_agent: '*', allow: %w[/] }],
sitemap: File.join(@app.data.site.host, 'sitemap.xml')
end
activate :inline_svg
set :favicons, [
{
rel: 'apple-touch-icon',
size: '180x180',
icon: 'apple-touch-icon.png'
},
{
rel: 'icon',
type: 'image/png',
size: '32x32',
icon: 'favicon32x32.png'
},
{
rel: 'icon',
type: 'image/png',
size: '16x16',
icon: 'favicon16x16.png'
},
{
rel: 'shortcut icon',
size: '64x64,32x32,24x24,16x16',
icon: 'favicon.ico'
}
]