middleman-blog 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -1
  3. data/.travis.yml +5 -7
  4. data/CHANGELOG.md +21 -0
  5. data/CONTRIBUTING.md +43 -0
  6. data/Gemfile +22 -14
  7. data/Gemfile-3.0 +27 -0
  8. data/{LICENSE → LICENSE.md} +2 -2
  9. data/README.md +33 -28
  10. data/Rakefile +17 -1
  11. data/features/blog_sources.feature +13 -0
  12. data/features/calendar_multiblog.feature +153 -0
  13. data/features/multiblog.feature +51 -0
  14. data/features/paginate_multiblog.feature +270 -0
  15. data/features/summary.feature +43 -0
  16. data/features/support/env.rb +6 -1
  17. data/features/tags_multiblog.feature +125 -0
  18. data/features/time_zone.feature +5 -0
  19. data/fixtures/blog-sources-app/source/blog/2013-08-08-slug-from-filename.html.markdown +7 -0
  20. data/fixtures/calendar-multiblog-app/config.rb +17 -0
  21. data/fixtures/calendar-multiblog-app/source/blog1/2011-01-01-new-article.html.markdown +7 -0
  22. data/fixtures/calendar-multiblog-app/source/blog1/2011-01-02-another-article.html.markdown +8 -0
  23. data/fixtures/calendar-multiblog-app/source/blog2/2011-01-01-new-article.html.markdown +7 -0
  24. data/fixtures/calendar-multiblog-app/source/blog2/2011-01-02-another-article.html.markdown +8 -0
  25. data/fixtures/calendar-multiblog-app/source/calendar1.html.erb +13 -0
  26. data/fixtures/calendar-multiblog-app/source/calendar2.html.erb +13 -0
  27. data/fixtures/calendar-multiblog-app/source/index.html.erb +15 -0
  28. data/fixtures/calendar-multiblog-app/source/layout.erb +15 -0
  29. data/fixtures/default-template-app/Gemfile +6 -0
  30. data/fixtures/default-template-app/config.rb +35 -0
  31. data/fixtures/default-template-app/source/2013-04-01-new-article.html.markdown +25 -0
  32. data/{features/encoding.feature → fixtures/default-template-app/source/about-me.html.erb} +0 -0
  33. data/fixtures/default-template-app/source/archives.html.erb +10 -0
  34. data/fixtures/default-template-app/source/index.html.erb +11 -0
  35. data/fixtures/default-template-app/source/javascripts/_zepto.pjax.js +744 -0
  36. data/fixtures/default-template-app/source/javascripts/app.js +11 -0
  37. data/fixtures/default-template-app/source/javascripts/modernizr.js +1 -0
  38. data/fixtures/default-template-app/source/layouts/layout.erb +62 -0
  39. data/fixtures/default-template-app/source/stylesheets/app.css.scss +109 -0
  40. data/fixtures/multiblog-app/config.rb +0 -0
  41. data/fixtures/multiblog-app/source/blog1/2012-12-12-other-article.html.markdown +5 -0
  42. data/fixtures/multiblog-app/source/blog2/2011/01/01/new-article.html.markdown +6 -0
  43. data/fixtures/multiblog-app/source/index.html.erb +7 -0
  44. data/fixtures/multiblog-app/source/layout.erb +30 -0
  45. data/fixtures/no-title-app/config.rb +3 -0
  46. data/fixtures/no-title-app/source/2013-08-07.html.markdown +6 -0
  47. data/fixtures/no-title-app/source/2013-08-08.html.markdown +7 -0
  48. data/fixtures/no-title-app/source/layout.erb +13 -0
  49. data/fixtures/paginate-multiblog-app/config.rb +31 -0
  50. data/fixtures/paginate-multiblog-app/source/blog1/2011-01-01-test-article.html.markdown +6 -0
  51. data/fixtures/paginate-multiblog-app/source/blog1/2011-01-02-test-article.html.markdown +6 -0
  52. data/fixtures/paginate-multiblog-app/source/blog1/2011-01-03-test-article.html.markdown +6 -0
  53. data/fixtures/paginate-multiblog-app/source/blog1/2011-01-04-test-article.html.markdown +6 -0
  54. data/fixtures/paginate-multiblog-app/source/blog1/2011-01-05-test-article.html.markdown +6 -0
  55. data/fixtures/paginate-multiblog-app/source/blog1/2011-02-01-test-article.html.markdown +6 -0
  56. data/fixtures/paginate-multiblog-app/source/blog1/index.html.erb +27 -0
  57. data/fixtures/paginate-multiblog-app/source/blog2/2011-01-01-test-article.html.markdown +6 -0
  58. data/fixtures/paginate-multiblog-app/source/blog2/2011-01-02-test-article.html.markdown +6 -0
  59. data/fixtures/paginate-multiblog-app/source/blog2/2011-01-03-test-article.html.markdown +6 -0
  60. data/fixtures/paginate-multiblog-app/source/blog2/2011-01-04-test-article.html.markdown +6 -0
  61. data/fixtures/paginate-multiblog-app/source/blog2/2011-01-05-test-article.html.markdown +6 -0
  62. data/fixtures/paginate-multiblog-app/source/blog2/index.html.erb +27 -0
  63. data/fixtures/paginate-multiblog-app/source/blog3/2011-01-01-test-article.html.markdown +6 -0
  64. data/fixtures/paginate-multiblog-app/source/blog3/2011-01-02-test-article.html.markdown +6 -0
  65. data/fixtures/paginate-multiblog-app/source/blog3/2011-01-03-test-article.html.markdown +6 -0
  66. data/fixtures/paginate-multiblog-app/source/blog3/2011-01-04-test-article.html.markdown +6 -0
  67. data/fixtures/paginate-multiblog-app/source/blog3/2011-01-05-test-article.html.markdown +6 -0
  68. data/fixtures/paginate-multiblog-app/source/blog3/2011-02-01-test-article.html.markdown +6 -0
  69. data/fixtures/paginate-multiblog-app/source/blog3/2011-02-02-test-article.html.markdown +6 -0
  70. data/fixtures/paginate-multiblog-app/source/blog3/index.html.erb +28 -0
  71. data/fixtures/paginate-multiblog-app/source/calendar1.html.erb +28 -0
  72. data/fixtures/paginate-multiblog-app/source/calendar2.html.erb +28 -0
  73. data/fixtures/paginate-multiblog-app/source/calendar3.html.erb +28 -0
  74. data/fixtures/paginate-multiblog-app/source/layout.erb +15 -0
  75. data/fixtures/paginate-multiblog-app/source/tag1.html.erb +23 -0
  76. data/fixtures/paginate-multiblog-app/source/tag2.html.erb +23 -0
  77. data/fixtures/paginate-multiblog-app/source/tag3.html.erb +19 -0
  78. data/fixtures/summary-app/config.rb +1 -0
  79. data/fixtures/summary-app/source/2011-01-01-article-with-no-summary-separator-and-comments-in-the-summary.html.erb +10 -0
  80. data/fixtures/summary-app/source/2011-01-01-article-with-standard-summary-separator.html.markdown +7 -0
  81. data/fixtures/summary-app/source/2012-06-19-article-with-no-summary-separator.html.markdown +9 -0
  82. data/fixtures/summary-app/source/2013-05-08-article-with-custom-separator.html.markdown +7 -0
  83. data/fixtures/summary-app/source/index.html.erb +5 -0
  84. data/fixtures/tags-multiblog-app/config.rb +15 -0
  85. data/fixtures/tags-multiblog-app/source/blog1/2011-01-01-new-article.html.markdown +7 -0
  86. data/fixtures/tags-multiblog-app/source/blog1/2011-01-02-another-article.html.markdown +9 -0
  87. data/fixtures/tags-multiblog-app/source/blog2/2011-01-01-new-article.html.markdown +7 -0
  88. data/fixtures/tags-multiblog-app/source/blog2/2011-01-02-another-article.html.markdown +9 -0
  89. data/fixtures/tags-multiblog-app/source/index.html.erb +8 -0
  90. data/fixtures/tags-multiblog-app/source/layout.erb +13 -0
  91. data/fixtures/tags-multiblog-app/source/tag1.html.erb +7 -0
  92. data/fixtures/tags-multiblog-app/source/tag2.html.erb +7 -0
  93. data/fixtures/time-zone-app/config.rb +5 -0
  94. data/fixtures/time-zone-app/source/blog/2013-06-24-hello.html.erb +5 -0
  95. data/lib/middleman-blog.rb +9 -4
  96. data/lib/middleman-blog/blog_article.rb +47 -21
  97. data/lib/middleman-blog/blog_data.rb +11 -4
  98. data/lib/middleman-blog/calendar_pages.rb +40 -25
  99. data/lib/middleman-blog/{extension.rb → extension_3_0.rb} +20 -16
  100. data/lib/middleman-blog/extension_3_1.rb +208 -0
  101. data/lib/middleman-blog/paginator.rb +33 -7
  102. data/lib/middleman-blog/tag_pages.rb +26 -9
  103. data/lib/middleman-blog/template/shared/Gemfile.tt +4 -2
  104. data/lib/middleman-blog/template/source/calendar.html.erb +1 -1
  105. data/lib/middleman-blog/template/source/feed.xml.builder +8 -7
  106. data/lib/middleman-blog/template/source/index.html.erb +1 -1
  107. data/lib/middleman-blog/template/source/tag.html.erb +1 -1
  108. data/lib/middleman-blog/truncate_html.rb +10 -1
  109. data/lib/middleman-blog/version.rb +1 -1
  110. data/middleman-blog.gemspec +12 -15
  111. metadata +180 -14
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-01-01
4
+ tags: foo
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-01-02
4
+ tags: foo
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-01-03
4
+ tags: bar
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-01-04
4
+ tags: bar
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-01-05
4
+ tags: bar
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-02-01
4
+ tags: bar
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: "Test Article"
3
+ date: 2011-02-02
4
+ tags: bar
5
+ ---
6
+ Test Article Content
@@ -0,0 +1,28 @@
1
+ ---
2
+ blog: blog_name_3
3
+ pageable: false
4
+ ---
5
+ Index: blog3
6
+
7
+ Paginate3: <%= paginate %>
8
+ Article Count3: <%= page_articles.size %>
9
+ <% if paginate %>
10
+ Page Num3: <%= page_number %>
11
+ Num Pages3: <%= num_pages %>
12
+ Per Page3: <%= per_page %>
13
+ Page Start3: <%= page_start %>
14
+ Page End3: <%= page_end %>
15
+ Next Page3: '<%= next_page.url if next_page %>'
16
+ Prev Page3: '<%= prev_page.url if prev_page %>'
17
+ <% end %>
18
+
19
+ <%# Page articles doesn't scope correctly if pageable isn't specified.%>
20
+ <% page_articles.each_with_index do |article, i| %>
21
+ <article class="<%= (i == 0) ? 'first' : '' %>">
22
+ <h1><a href="<%= article.url %>"><%= article.title %></a> <span><%= article.date.strftime('%b %e %Y') %></span></h1>
23
+
24
+ <%= article.summary %>
25
+
26
+ <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
27
+ </article>
28
+ <% end %>
@@ -0,0 +1,28 @@
1
+ ---
2
+ pageable: true
3
+ ---
4
+ Year1: '<%= year %>'
5
+ Month1: '<%= month if defined?(month) %>'
6
+ Day1: '<%= day if defined?(day) %>'
7
+
8
+ Paginate1: <%= paginate %>
9
+ Article Count1: <%= page_articles.size %>
10
+ <% if paginate %>
11
+ Page Num1: <%= page_number %>
12
+ Num Pages1: <%= num_pages %>
13
+ Per Page1: <%= per_page %>
14
+ Page Start1: <%= page_start %>
15
+ Page End1: <%= page_end %>
16
+ Next Page1: '<%= next_page.url if next_page %>'
17
+ Prev Page1: '<%= prev_page.url if prev_page %>'
18
+ <% end %>
19
+
20
+ <% page_articles.each_with_index do |article, i| %>
21
+ <article class="<%= (i == 0) ? 'first' : '' %>">
22
+ <h1><a href="<%= article.url %>"><%= article.title %></a> <span><%= article.date.strftime('%b %e %Y') %></span></h1>
23
+
24
+ <%= article.summary %>
25
+
26
+ <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
27
+ </article>
28
+ <% end %>
@@ -0,0 +1,28 @@
1
+ ---
2
+ pageable: true
3
+ ---
4
+ Year2: '<%= year %>'
5
+ Month2: '<%= month if defined?(month) %>'
6
+ Day2: '<%= day if defined?(day) %>'
7
+
8
+ Paginate2: <%= paginate %>
9
+ Article Count2: <%= page_articles.size %>
10
+ <% if paginate %>
11
+ Page Num2: <%= page_number %>
12
+ Num Pages2: <%= num_pages %>
13
+ Per Page2: <%= per_page %>
14
+ Page Start2: <%= page_start %>
15
+ Page End2: <%= page_end %>
16
+ Next Page2: '<%= next_page.url if next_page %>'
17
+ Prev Page2: '<%= prev_page.url if prev_page %>'
18
+ <% end %>
19
+
20
+ <% page_articles.each_with_index do |article, i| %>
21
+ <article class="<%= (i == 0) ? 'first' : '' %>">
22
+ <h1><a href="<%= article.url %>"><%= article.title %></a> <span><%= article.date.strftime('%b %e %Y') %></span></h1>
23
+
24
+ <%= article.summary %>
25
+
26
+ <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
27
+ </article>
28
+ <% end %>
@@ -0,0 +1,28 @@
1
+ ---
2
+ pageable: true
3
+ ---
4
+ Year3: '<%= year %>'
5
+ Month3: '<%= month if defined?(month) %>'
6
+ Day3: '<%= day if defined?(day) %>'
7
+
8
+ Paginate3: <%= paginate %>
9
+ Article Count3: <%= page_articles.size %>
10
+ <% if paginate %>
11
+ Page Num3: <%= page_number %>
12
+ Num Pages3: <%= num_pages %>
13
+ Per Page3: <%= per_page %>
14
+ Page Start3: <%= page_start %>
15
+ Page End3: <%= page_end %>
16
+ Next Page3: '<%= next_page.url if next_page %>'
17
+ Prev Page3: '<%= prev_page.url if prev_page %>'
18
+ <% end %>
19
+
20
+ <% page_articles.each_with_index do |article, i| %>
21
+ <article class="<%= (i == 0) ? 'first' : '' %>">
22
+ <h1><a href="<%= article.url %>"><%= article.title %></a> <span><%= article.date.strftime('%b %e %Y') %></span></h1>
23
+
24
+ <%= article.summary %>
25
+
26
+ <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
27
+ </article>
28
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ </head>
5
+ <body>
6
+ <% if is_blog_article? %>
7
+ <%= yield %>
8
+ Url: <%= current_article.url %>
9
+ Previous: <%= current_article.previous_article.try(:url) %>
10
+ Next: <%= current_article.next_article.try(:url) %>
11
+ <% else %>
12
+ <%= yield %>
13
+ <% end %>
14
+ </body>
15
+ </html>
@@ -0,0 +1,23 @@
1
+ ---
2
+ pageable: true
3
+ per_page: 2
4
+ ---
5
+ Tag1: <%= tagname %>
6
+
7
+ Paginate1: <%= paginate %>
8
+ Article Count1: <%= page_articles.size %>
9
+ <% if paginate %>
10
+ Page Num1: <%= page_number %>
11
+ Num Pages1: <%= num_pages %>
12
+ Per Page1: <%= per_page %>
13
+ Page Start1: <%= page_start %>
14
+ Page End1: <%= page_end %>
15
+ Next Page1: '<%= next_page.url if next_page %>'
16
+ Prev Page1: '<%= prev_page.url if prev_page %>'
17
+ <% end %>
18
+
19
+ <% if page_articles %>
20
+ <% page_articles.each do |article| %>
21
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
22
+ <% end %>
23
+ <% end %>
@@ -0,0 +1,23 @@
1
+ ---
2
+ pageable: true
3
+ per_page: 1
4
+ ---
5
+ Tag2: <%= tagname %>
6
+
7
+ Paginate2: <%= paginate %>
8
+ Article Count2: <%= page_articles.size %>
9
+ <% if paginate %>
10
+ Page Num2: <%= page_number %>
11
+ Num Pages2: <%= num_pages %>
12
+ Per Page2: <%= per_page %>
13
+ Page Start2: <%= page_start %>
14
+ Page End2: <%= page_end %>
15
+ Next Page2: '<%= next_page.url if next_page %>'
16
+ Prev Page2: '<%= prev_page.url if prev_page %>'
17
+ <% end %>
18
+
19
+ <% if page_articles %>
20
+ <% page_articles.each do |article| %>
21
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
22
+ <% end %>
23
+ <% end %>
@@ -0,0 +1,19 @@
1
+ Tag3: <%= tagname %>
2
+
3
+ Paginate3: <%= paginate %>
4
+ Article Count3: <%= page_articles.size %>
5
+ <% if paginate %>
6
+ Page Num3: <%= page_number %>
7
+ Num Pages3: <%= num_pages %>
8
+ Per Page3: <%= per_page %>
9
+ Page Start3: <%= page_start %>
10
+ Page End3: <%= page_end %>
11
+ Next Page3: '<%= next_page.url if next_page %>'
12
+ Prev Page3: '<%= prev_page.url if prev_page %>'
13
+ <% end %>
14
+
15
+ <% if page_articles %>
16
+ <% page_articles.each do |article| %>
17
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
18
+ <% end %>
19
+ <% end %>
@@ -0,0 +1 @@
1
+ activate :blog
@@ -0,0 +1,10 @@
1
+ ---
2
+ title: "Article with no summary separator and comments in the summary"
3
+ ---
4
+
5
+ <p>Summary from article with no summary separator and comments in the summary.</p>
6
+
7
+ <p>Lorem ipsum <!-- html comment --> dolor sit amet, consectetur adipiscing elit. Nullam tempus, sem non bibendum placerat, urna augue bibendum lectus, id fringilla ligula turpis semper quam. Mauris malesuada g
8
+ ravida viverra. Sed quis turpis neque, eu posuere dolor. Integer risus nulla, molestie sit amet convallis eu, vulputate eget ligula. Aenean aliquet euismod magna, convallis ultrices diam tristique in. Suspendisse potenti. In nunc odio, lobortis at ullamcorper sit amet, placerat eget massa. Sed ultrices sapien in sapien vulputate sed tincidunt turpis viverra. Vestibulum aliquam lacus nec ante rutrum tempus nec non nisi. Quisque imperdiet ultricies lectus in feugiat. Praesent vel aliquet odio. Quisque sed dui non metus congue ullamcorper. Donec quis libero tellus. Nulla ullamcorper turpis eget felis facilisis ut tincidunt lorem porta. Integer id quam elit, quis sollicitudin felis. Vestibulum eu arcu orci, a tristique nunc.</p>
9
+
10
+ <p>Extended part from article with no summary separator and comments in the summary.</p>
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Article with standard summary separator"
3
+ ---
4
+
5
+ Summary from article with separator.
6
+ READMORE
7
+ Extended part from article with separator.
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: "Article with no summary separator"
3
+ ---
4
+
5
+ Summary from article with no separator.
6
+
7
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tempus, sem non bibendum placerat, urna augue bibendum lectus, id fringilla ligula turpis semper quam. Mauris malesuada gravida viverra. Sed quis turpis neque, eu posuere dolor. Integer risus nulla, molestie sit amet convallis eu, vulputate eget ligula. Aenean aliquet euismod magna, convallis ultrices diam tristique in. Suspendisse potenti. In nunc odio, lobortis at ullamcorper sit amet, placerat eget massa. Sed ultrices sapien in sapien vulputate sed tincidunt turpis viverra. Vestibulum aliquam lacus nec ante rutrum tempus nec non nisi. Quisque imperdiet ultricies lectus in feugiat. Praesent vel aliquet odio. Quisque sed dui non metus congue ullamcorper. Donec quis libero tellus. Nulla ullamcorper turpis eget felis facilisis ut tincidunt lorem porta. Integer id quam elit, quis sollicitudin felis. Vestibulum eu arcu orci, a tristique nunc.
8
+
9
+ Extended part from article with no separator.
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Article with custom summary separator"
3
+ ---
4
+
5
+ Summary from article with custom separator.
6
+ /SPLIT_SUMMARY_BEFORE_THIS/
7
+ Extended part from article with custom separator.
@@ -0,0 +1,5 @@
1
+ <% blog.articles.each do |article| %>
2
+ <article>
3
+ <%= article.summary %>
4
+ </article>
5
+ <% end %>
@@ -0,0 +1,15 @@
1
+ activate :blog do |blog|
2
+ blog.name = "blog_name_1"
3
+ blog.prefix = "blog1"
4
+ blog.sources = ":year-:month-:day-:title.html"
5
+ blog.permalink = ":year-:month-:day-:title.html"
6
+ blog.tag_template = "tag1.html"
7
+ end
8
+
9
+ activate :blog do |blog|
10
+ blog.name = "blog_name_2"
11
+ blog.prefix = "blog2"
12
+ blog.sources = ":year-:month-:day-:title.html"
13
+ blog.permalink = ":year-:month-:day-:title.html"
14
+ blog.tag_template = "tag2.html"
15
+ end
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Newer Article"
3
+ date: 2011-01-01
4
+ tags: foo1, bar1, fooX, barX
5
+ ---
6
+
7
+ Newer Article Content
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: "Another Article"
3
+ date: 2011-01-02
4
+ tags:
5
+ - foo1
6
+ - fooX
7
+ ---
8
+
9
+ Another Article Content
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: "Newer Article"
3
+ date: 2011-01-01
4
+ tags: foo2, bar2, fooX, barX
5
+ ---
6
+
7
+ Newer Article Content
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: "Another Article"
3
+ date: 2011-01-02
4
+ tags:
5
+ - foo2
6
+ - fooX
7
+ ---
8
+
9
+ Another Article Content
@@ -0,0 +1,8 @@
1
+ <% blog(:blog_name_1).articles[0...12].each do |article| %>
2
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
3
+ <% end %>
4
+ <% blog(:blog_name_2).articles[0...12].each do |article| %>
5
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
6
+ <% end %>
7
+ Tag Path1: '<%= tag_path("fooX", :blog_name_1) %>'
8
+ Tag Path2: '<%= tag_path("fooX", :blog_name_2) %>'
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ </head>
5
+ <body>
6
+ <% if is_blog_article? %>
7
+ <%= current_article.url %>
8
+ <%= yield %>
9
+ <% else %>
10
+ <%= yield %>
11
+ <% end %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,7 @@
1
+ Tag1: <%= tagname %>
2
+
3
+ <% if articles %>
4
+ <% articles[0...12].each do |article| %>
5
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
6
+ <% end %>
7
+ <% end %>
@@ -0,0 +1,7 @@
1
+ Tag2: <%= tagname %>
2
+
3
+ <% if articles %>
4
+ <% articles[0...12].each do |article| %>
5
+ <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
6
+ <% end %>
7
+ <% end %>
@@ -0,0 +1,5 @@
1
+ set :time_zone, 'Tokyo'
2
+
3
+ activate :blog do |blog|
4
+ blog.prefix = 'blog'
5
+ end
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Time zone
3
+ layout: false
4
+ ---
5
+ <%= Time.zone.to_s %>
@@ -3,8 +3,13 @@ require "middleman-core"
3
3
  require "middleman-blog/version"
4
4
  require "middleman-blog/template"
5
5
  require "middleman-blog/commands/article"
6
-
6
+
7
7
  ::Middleman::Extensions.register(:blog) do
8
- require "middleman-blog/extension"
9
- ::Middleman::Blog
10
- end
8
+ if defined?(::Middleman::Extension)
9
+ require "middleman-blog/extension_3_1"
10
+ ::Middleman::BlogExtension
11
+ else
12
+ require "middleman-blog/extension_3_0"
13
+ ::Middleman::Blog
14
+ end
15
+ end