-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
48 lines (38 loc) · 803 Bytes
/
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
set :css_dir, 'stylesheets'
set :images_dir, 'images'
page 'error.html', layout: false
activate :google_analytics do |ga|
ga.tracking_id = 'UA-5973800-7'
end
configure :build do
activate :asset_hash
activate :minify_css
end
configure :development do
activate :livereload
end
helpers do
def github_url
"https://github.com/justincampbell"
end
def schedule_url
"http://calendly.com/justincampbell/meet/"
end
def source_url
"https://github.com/justincampbell/justincampbell.me"
end
def twitter_url
"http://twitter.com/justincampbell"
end
def projects
data.projects.sort_by(&:date).reverse
end
def tags
data
.projects
.map(&:tags)
.flatten
.inject(Hash.new(0)) { |hash, tag| hash[tag] += 1; hash }
.sort
end
end