-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.rb
101 lines (77 loc) · 2.53 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#require_relative "./lib/build_cleaner"
set :site_description, "Ruby & Elixir Development : Sheffield UK"
# For custom domains on github pages
page "CNAME", layout: false
page "/sitemap.xml", layout: false
page "/50x.html", directory_index: false
page "/403.html", directory_index: false
page "/404.html", directory_index: false
page "/500.html", directory_index: false
page "/502.html", directory_index: false
page "/503.html", directory_index: false
page "/504.html", directory_index: false
page "/503.jpg", directory_index: false
page "/maintenance.html", directory_index: false
# page "/*", layout: 'page'
page "/articles/*", :layout => "article"
page "/articles/", layout: "page"
page "/", layout: 'layout'
set :url_root, "https://www.summit360.co.uk"
activate :search_engine_sitemap
activate :meta_tags
# activate :google_analytics do |ga|
# ga.tracking_id = 'UA-12318827-2' # Replace with your property ID.
# # Tracking in development environment (default = true)
# #ga.development = false
# end
###
# Helpers
###
require "lib/custom_helpers"
helpers CustomHelpers
#require 'bootstrap-sass'
# Automatic image dimensions on image_tag helper
activate :automatic_image_sizes
activate :directory_indexes
set :relative_links, true
# Reload the browser automatically whenever files change
configure :development do
activate :livereload
end
activate :blog do |blog|
# blog.prefix = "articles"
blog.sources = "posts/{year}-{month}-{day}-{title}.html"
blog.taglink = "tag/{tag}.html"
blog.permalink = "posts/{title}.html"
blog.summary_separator = /SPLIT_SUMMARY_BEFORE_THIS/
blog.paginate = true
blog.page_link = "p{num}"
blog.per_page = 20
end
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
#
## Middleman v4 Sprockets
#
activate :sprockets
sprockets.append_path 'node_modules/bootstrap-sass/assets/fonts'
sprockets.append_path 'node_modules/bootstrap-sass/assets/javascripts'
sprockets.append_path 'node_modules'
# Build-specific configuration
configure :build do
set :build_dir, 'public'
#set :base_url, "/middleman" # baseurl for GitLab Pages (project name) - leave empty if you're building a user/group website
# For example, change the Compass output style for deployment
activate :minify_css
# Minify Javascript on build
activate :minify_javascript
# Enable cache buster
activate :asset_hash
# Use relative URLs
activate :relative_assets
# Minify HTML on build
activate :minify_html
# Or use a different image path
# set :http_prefix, "/Content/images/"
end