-
Notifications
You must be signed in to change notification settings - Fork 36
/
config.rb
67 lines (54 loc) · 1.52 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
###
# Blog settings
###
# Time.zone = "UTC"
activate :blog do |blog|
blog.permalink = "{no}-{title}.html"
blog.sources = "posts/{no}-{title}.html"
blog.layout = "layouts/post.html"
blog.summary_separator = /ARTICLE/
blog.default_extension = ".md"
blog.tag_template = "tag.html"
# blog.taglink = "tags/{tag}.html"
end
page "/feed.xml", layout: false
###
# Compass
###
# compass_config do |config|
# config.output_style = :compact
# end
###
# Page options, layouts, aliases and proxies
###
# page "/path/to/file.html", layout: false
# page "/path/to/file.html", layout: :otherlayout
#
# with_layout :admin do
# page "/admin/*"
# end
# Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
# proxy "/this-page-has-no-template.html", "/template-file.html", locals: {
# which_fake_page: "Rendering a fake page with a local variable" }
###
# Helpers
###
helpers do
def get_contributors(template_location, relative_article_path)
article_path = File.dirname(template_location) + '/../' + relative_article_path + '.md'
contributors = `git log --format='%aN' -- #{article_path}`.split("\n").uniq - ["Jan Lelis"]
"Article Contributions by: #{contributors.join(', ')}<br>" unless contributors.empty?
end
end
# activate :automatic_image_sizes
# activate :livereload
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
configure :build do
activate :minify_css
activate :minify_javascript
# activate :asset_hash
# activate :relative_assets
# set :http_prefix, "/Content/images/"
end