-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.rb
More file actions
38 lines (29 loc) · 795 Bytes
/
config.rb
File metadata and controls
38 lines (29 loc) · 795 Bytes
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
require 'stringex'
require 'time'
# Custom Config
DATA_EXT = ".yml" # Should be JSON if easier
# Paths
set :css_dir, 'public/css'
set :js_dir, 'public/js'
set :images_dir, 'public/images'
activate :blog do |blog|
blog.permalink = "/news/{year}-{month}-{day}-{title}.html"
blog.layout = "blog"
blog.publish_future_dated = true
end
helpers do
def markdown(data)
Tilt::KramdownTemplate.new { data }.render
end
def speaker_twitter(name)
"<a href=\"https://twitter.com/#{name}\"><i class=\"speaker-social-icons fab fa-twitter\"></i></a>"
end
def speaker_github(name)
"<a href=\"https://github.com/#{name}\"><i class=\"speaker-social-icons fab fa-github\"></i></a>"
end
end
# Middleman Plugins
activate :livereload
configure :build do
activate :minify_css
end