This repository was archived by the owner on Aug 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.rb
More file actions
63 lines (51 loc) · 1.31 KB
/
config.rb
File metadata and controls
63 lines (51 loc) · 1.31 KB
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
# Serve pages with no layout
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
# Template helpers
helpers do
def page_title(title)
(title) ? "#{title} | #{site_name}" : site_name
end
def page_description(description)
description || "A grassroots initiative to connect the Software Community in Niagara"
end
def page_image(image)
image || "/images/cards/open-graph_1200x630.png"
end
def page_url(url)
"#{site_url}#{url}"
end
def site_name
"Software Niagara"
end
def site_url
"http://www.softwareniagara.com"
end
def site_handle
"@softwareniagara"
end
end
# External pipeline configuration
activate :external_pipeline,
name: :webpack,
command: build? ?
"BUILD_PRODUCTION=1 ./node_modules/webpack/bin/webpack.js --bail -p" :
"BUILD_DEVELOPMENT=1 ./node_modules/webpack/bin/webpack.js --watch -d --progress --color",
source: ".tmp/dist",
latency: 1
# Development-specific configuration
configure :development do
# Use live reload
activate :livereload
end
# Build-specific configuration
configure :build do
# Minify CSS on build
activate :minify_css
# Minify Javascript on build
activate :minify_javascript
end
activate :deploy do |deploy|
deploy.deploy_method = :git
end