forked from unboxed/unboxed.co
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.rb
More file actions
66 lines (53 loc) · 1.58 KB
/
Copy pathconfig.rb
File metadata and controls
66 lines (53 loc) · 1.58 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
64
65
66
set :relative_links, true
set :layout, 'application'
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :markdown_engine, :redcarpet
set :markdown, fenced_code_blocks: true, autolink: true, smartypants: true, underline: true
# blog
activate :blog do |blog|
blog.name = 'blog'
blog.layout = 'blog_article'
blog.prefix = 'blog'
blog.taglink = "{tag}.html"
blog.permalink = "{title}.html"
blog.tag_template = 'blog/tag.html'
blog.new_article_template = 'templates/blog_article.md'
end
# news
activate :blog do |blog|
blog.name = 'news'
blog.layout = 'news_article'
blog.prefix = 'news'
blog.permalink = "{title}.html"
blog.new_article_template = 'templates/news_article.md'
end
activate :similar, algorithm: :related_blog_articles
activate :directory_indexes
activate :sitemap, hostname: "https://unboxed.co"
configure :development do
activate :livereload
end
require 'lib/helpers'
helpers Helpers
data.people.each do |person|
proxy "blog/author/#{person.short_name}.html", "blog_author_grid.html",
locals: { author_name: person.name }, ignore: true
end
ignore '/templates/*'
ignore '/partials/*'
ignore '/**/README.md'
page "/blog/feed.xml", layout: false
page "/blog/feed.rss", layout: false
page "/news/feed.xml", layout: false
page "/news/feed.rss", layout: false
page "/404.html", directory_index: false
configure :build do
activate :minify_css
activate :minify_javascript
end
after_build do |builder|
builder.source_paths << File.dirname(__FILE__)
builder.copy_file('data/_redirects', 'build/_redirects')
end