|
14 | 14 | blog.layout = "blog_post"
|
15 | 15 |
|
16 | 16 | blog.permalink = "/{year}/{month}/{title}"
|
17 |
| - # Matcher for blog source files |
18 |
| - # blog.sources = "{year}-{month}-{day}-{title}.html" |
19 |
| - # blog.taglink = "tags/{tag}.html" |
20 |
| - # blog.summary_separator = /(READMORE)/ |
21 |
| - # blog.summary_length = 250 |
22 |
| - # blog.year_link = "{year}.html" |
23 |
| - # blog.month_link = "{year}/{month}.html" |
24 |
| - # blog.day_link = "{year}/{month}/{day}.html" |
25 |
| - # blog.default_extension = ".markdown" |
26 | 17 |
|
27 | 18 | blog.tag_template = "tag.html"
|
28 | 19 | blog.calendar_template = "calendar.html"
|
29 | 20 |
|
30 | 21 | # Enable pagination
|
31 | 22 | blog.paginate = true
|
32 | 23 | blog.per_page = 10
|
33 |
| - # blog.page_link = "page/{num}" |
34 | 24 | end
|
35 | 25 |
|
36 | 26 | page "/blog/feed.xml", layout: false
|
|
89 | 79 | }
|
90 | 80 | end
|
91 | 81 |
|
92 |
| -activate :deploy do |deploy| |
93 |
| - deploy.method = :git |
94 |
| - deploy.build_before = true |
95 |
| - deploy.branch = 'master' |
96 |
| - |
97 |
| - case ENV['TARGET'].to_s |
98 |
| - when /prod/i |
99 |
| - deploy.remote = 'git@github.com:rspec/rspec.github.io.git' |
100 |
| - else |
101 |
| - deploy.remote = 'git@github.com:RSpec-Staging/rspec-staging.github.io.git' |
| 82 | +def deploy_to target |
| 83 | + activate :deploy do |deploy| |
| 84 | + deploy.method = :git |
| 85 | + deploy.build_before = true |
| 86 | + deploy.branch = 'master' |
| 87 | + deploy.remote = target |
102 | 88 | end
|
103 | 89 | end
|
104 | 90 |
|
| 91 | +case ENV['TARGET'].to_s |
| 92 | +when /prod/i |
| 93 | + deploy_to 'git@github.com:rspec/rspec.github.io.git' |
| 94 | +else |
| 95 | + deploy_to 'git@github.com:RSpec-Staging/rspec-staging.github.io.git' |
| 96 | + ignore 'CNAME' |
| 97 | +end |
| 98 | + |
105 | 99 | helpers do
|
106 | 100 | def primary_page_class
|
107 | 101 | page_classes.split(" ").first
|
|
0 commit comments