middleman-blog 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +16 -0
  3. data/.gitignore +5 -1
  4. data/.travis.yml +33 -19
  5. data/.yardopts +2 -2
  6. data/CHANGELOG.md +51 -24
  7. data/CONTRIBUTING.md +5 -2
  8. data/Gemfile +23 -16
  9. data/ISSUE_TEMPLATE.md +14 -0
  10. data/LICENSE.md +15 -17
  11. data/README.md +52 -14
  12. data/Rakefile +10 -7
  13. data/features/article_dirs.feature +34 -0
  14. data/features/blog_sources.feature +35 -6
  15. data/features/filename_date.feature +4 -2
  16. data/features/language.feature +108 -77
  17. data/features/layouts.feature +3 -0
  18. data/features/multiblog.feature +1 -1
  19. data/features/next_previous.feature +10 -7
  20. data/features/permalink.feature +17 -0
  21. data/features/summary.feature +26 -2
  22. data/features/support/env.rb +7 -4
  23. data/features/support/time_steps.rb +7 -3
  24. data/features/tags.feature +68 -34
  25. data/fixtures/article-dirs-app/config-directory-indexes.rb +6 -0
  26. data/fixtures/article-dirs-app/config-permalink-with-dot.rb +6 -0
  27. data/fixtures/blog-sources-app/config.rb +6 -3
  28. data/fixtures/blog-sources-app/source/blog/2011-01-01-new-article.html.markdown +5 -3
  29. data/fixtures/blog-sources-app/source/blog/2013-08-08-slug-from-filename.html.markdown +5 -3
  30. data/fixtures/blog-sources-app/source/index.html.erb +12 -8
  31. data/fixtures/blog-sources-app/source/layout.erb +21 -10
  32. data/fixtures/blog-sources-no-date-app/config.rb +6 -0
  33. data/fixtures/blog-sources-no-date-app/source/blog/new-article.html.markdown +8 -0
  34. data/fixtures/blog-sources-no-date-app/source/index.html.erb +13 -0
  35. data/fixtures/blog-sources-no-date-app/source/layout.erb +24 -0
  36. data/fixtures/blog-sources-no-day-app/config.rb +6 -0
  37. data/fixtures/blog-sources-no-day-app/source/2012-08-testing.html.markdown +8 -0
  38. data/fixtures/blog-sources-no-day-app/source/layout.erb +24 -0
  39. data/fixtures/{no-title-app → blog-sources-no-title-app}/config.rb +3 -0
  40. data/fixtures/blog-sources-no-title-app/source/2013-08-07.html.markdown +8 -0
  41. data/fixtures/blog-sources-no-title-app/source/2013-08-08.html.markdown +9 -0
  42. data/fixtures/{no-date-app → blog-sources-no-title-app}/source/layout.erb +11 -0
  43. data/fixtures/blog-sources-subdirs-app/config.rb +6 -3
  44. data/fixtures/blog-sources-subdirs-app/source/blog.html.erb +6 -3
  45. data/fixtures/blog-sources-subdirs-app/source/blog/another-post.html.markdown +9 -0
  46. data/fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.markdown +9 -0
  47. data/fixtures/blog-sources-subdirs-app/source/layout.erb +24 -1
  48. data/fixtures/calendar-app/config-directory-indexes.rb +6 -4
  49. data/fixtures/calendar-app/config-only-year.rb +8 -6
  50. data/fixtures/calendar-app/config.rb +6 -4
  51. data/fixtures/calendar-app/source/layout.erb +17 -12
  52. data/fixtures/language-app/locales/en.yml +5 -4
  53. data/fixtures/language-app/locales/ru.yml +5 -4
  54. data/fixtures/language-app/source/2013-09-05-previous-english-article.html.erb +9 -0
  55. data/fixtures/language-app/source/2013-09-06-previous-russian-article.html.erb +9 -0
  56. data/fixtures/language-app/source/2013-09-07-english-article-with-lang-in-frontmatter.html.erb +5 -2
  57. data/fixtures/language-app/source/2013-09-07-russian-article-with-lang-in-frontmatter.html.erb +5 -2
  58. data/fixtures/language-app/source/2013-09-08-next-russian-article.html.erb +9 -0
  59. data/fixtures/language-app/source/2013-09-09-next-english-article.html.erb +9 -0
  60. data/fixtures/language-app/source/layouts/layout.erb +12 -1
  61. data/fixtures/language-app/source/localizable/index.html.erb +3 -1
  62. data/fixtures/layouts-app/source/2011/01/01/fourth-article.html.markdown +7 -0
  63. data/fixtures/paginate-app/config-directory-indexes.rb +14 -12
  64. data/fixtures/paginate-app/config-paginate-off.rb +14 -12
  65. data/fixtures/paginate-app/config.rb +16 -13
  66. data/fixtures/permalink-app/config.rb +7 -0
  67. data/fixtures/permalink-app/source/index.html.erb +13 -0
  68. data/fixtures/permalink-app/source/layout.erb +26 -0
  69. data/fixtures/permalink-app/source/news/2011-01-01-new-article.html.markdown +9 -0
  70. data/fixtures/summary-app/source/2013-05-08-article-with-custom-separator.html.markdown +1 -1
  71. data/fixtures/summary-app/source/2016-05-21-article-with-comment-separator.html.markdown +7 -0
  72. data/fixtures/tags-app/config-directory-indexes.rb +2 -1
  73. data/fixtures/tags-app/config-filters.rb +8 -0
  74. data/fixtures/tags-app/config-no-tags.rb +5 -3
  75. data/fixtures/tags-app/config.rb +2 -1
  76. data/fixtures/tags-app/source/blog/2011-01-03-no-taga.html.markdown +6 -0
  77. data/lib/middleman-blog.rb +7 -4
  78. data/lib/middleman-blog/blog_article.rb +157 -34
  79. data/lib/middleman-blog/blog_data.rb +83 -29
  80. data/lib/middleman-blog/calendar_pages.rb +1 -1
  81. data/lib/middleman-blog/commands/article.rb +88 -30
  82. data/lib/middleman-blog/commands/article.tt +4 -1
  83. data/lib/middleman-blog/custom_pages.rb +1 -1
  84. data/lib/middleman-blog/helpers.rb +2 -2
  85. data/lib/middleman-blog/paginator.rb +5 -4
  86. data/lib/middleman-blog/tag_pages.rb +61 -24
  87. data/lib/middleman-blog/truncate_html.rb +4 -9
  88. data/lib/middleman-blog/uri_templates.rb +44 -30
  89. data/lib/middleman-blog/version.rb +3 -1
  90. data/middleman-blog.gemspec +19 -17
  91. data/spec/spec_helper.rb +1 -1
  92. data/spec/uri_templates_spec.rb +21 -6
  93. metadata +68 -52
  94. data/.gemtest +0 -0
  95. data/features/no_date.feature +0 -9
  96. data/features/permalink-data.feature +0 -12
  97. data/fixtures/blog-sources-app/source/_article_template.erb +0 -1
  98. data/fixtures/blog-sources-subdirs-app/source/blog/another-post.html.md.erb +0 -8
  99. data/fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.md.erb +0 -8
  100. data/fixtures/no-date-app/config.rb +0 -3
  101. data/fixtures/no-date-app/source/_article_template.erb +0 -1
  102. data/fixtures/no-date-app/source/blog/new-article.html.markdown +0 -6
  103. data/fixtures/no-date-app/source/index.html.erb +0 -9
  104. data/fixtures/no-day-app/config.rb +0 -3
  105. data/fixtures/no-day-app/source/2012-08-testing.html.markdown +0 -6
  106. data/fixtures/no-day-app/source/layout.erb +0 -13
  107. data/fixtures/no-title-app/source/2013-08-07.html.markdown +0 -6
  108. data/fixtures/no-title-app/source/2013-08-08.html.markdown +0 -7
  109. data/fixtures/no-title-app/source/layout.erb +0 -13
  110. data/fixtures/permalink-data-app/config.rb +0 -5
  111. data/fixtures/permalink-data-app/source/index.html.erb +0 -3
  112. data/fixtures/permalink-data-app/source/layout.erb +0 -14
  113. data/fixtures/permalink-data-app/source/news/2011-01-01-new-article.html.markdown +0 -7
@@ -1,53 +1,90 @@
1
1
  require 'middleman-blog/uri_templates'
2
2
 
3
3
  module Middleman
4
+
4
5
  module Blog
5
- # A sitemap resource manipulator that adds a tag page to the sitemap
6
- # for each tag in the associated blog
6
+
7
+ ##
8
+ # A sitemap resource manipulator that adds a tag page to the sitemap for
9
+ # each tag in the associated blog
10
+ ##
7
11
  class TagPages
8
- include UriTemplates
9
12
 
10
- def initialize(app, blog_controller)
11
- @sitemap = app.sitemap
12
- @blog_controller = blog_controller
13
- @tag_link_template = uri_template blog_controller.options.taglink
14
- @tag_template = blog_controller.options.tag_template
15
- @blog_data = blog_controller.data
13
+ include UriTemplates
16
14
 
15
+ ##
16
+ # Initialise Tag pages
17
+ #
18
+ # @param app [Object] Middleman app
19
+ # @param blog_controller [Object] Blog controller
20
+ ##
21
+ def initialize( app, blog_controller )
22
+ @sitemap = app.sitemap
23
+ @blog_controller = blog_controller
24
+ @tag_link_template = uri_template blog_controller.options.taglink
25
+ @tag_template = blog_controller.options.tag_template
26
+ @blog_data = blog_controller.data
17
27
  @generate_tag_pages = blog_controller.options.generate_tag_pages
18
28
  end
19
29
 
30
+ ##
20
31
  # Get a path to the given tag, based on the :taglink setting.
21
- # @param [String] tag
22
- # @return [String]
23
- def link(tag)
24
- apply_uri_template @tag_link_template, tag: safe_parameterize(tag)
32
+ #
33
+ # @param tag [String] Tag name
34
+ # @return [String] Safe Tag URL
35
+ ##
36
+ def link( tag )
37
+ apply_uri_template @tag_link_template, tag: safe_parameterize( tag )
25
38
  end
26
39
 
40
+ ##
27
41
  # Update the main sitemap resource list
28
- # @return [void]
29
- def manipulate_resource_list(resources)
42
+ #
43
+ # @param resources [Object] Tag name
44
+ # @return [void]
45
+ ##
46
+ def manipulate_resource_list( resources )
47
+
30
48
  return resources unless @generate_tag_pages
31
49
 
32
- resources + @blog_data.tags.map do |tag, articles|
33
- tag_page_resource(tag, articles)
50
+ resources + @blog_data.tags.map do | tag, articles |
51
+ tag_page_resource( tag, articles )
34
52
  end
53
+
35
54
  end
36
55
 
37
56
  private
38
57
 
39
- def tag_page_resource(tag, articles)
40
- Sitemap::ProxyResource.new(@sitemap, link(tag), @tag_template).tap do |p|
41
- # Add metadata in local variables so it's accessible to
42
- # later extensions
58
+ ##
59
+ # Create the tag page resources
60
+ #
61
+ # @param tag [String] Tag name
62
+ # @param articles [Object] Articles
63
+ # @return [Object] Sitemap
64
+ #
65
+ # @todo Can we inject the correct locale into the metadata here
66
+ ##
67
+ def tag_page_resource( tag, articles )
68
+
69
+ Sitemap::ProxyResource.new( @sitemap, link( tag ), @tag_template ).tap do | p |
70
+
71
+ # Detect "formatted" tag in first article - trying to guess the correct format to show
72
+ # tagname = articles.first.tags.detect { |article_tag| safe_parameterize(article_tag) == tag }
73
+
74
+ # Add metadata in local variables so it's accessible to later extensions
43
75
  p.add_metadata locals: {
44
- 'page_type' => 'tag',
45
- 'tagname' => tag,
46
- 'articles' => articles,
76
+ 'page_type' => 'tag',
77
+ 'tagname' => tag,
78
+ 'articles' => articles,
47
79
  'blog_controller' => @blog_controller
48
80
  }
81
+
49
82
  end
83
+
50
84
  end
85
+
51
86
  end
87
+
52
88
  end
89
+
53
90
  end
@@ -9,13 +9,8 @@ end
9
9
  module TruncateHTML
10
10
  def self.truncate_at_separator(text, separator)
11
11
  text = text.encode('UTF-8') if text.respond_to?(:encode)
12
- doc = Nokogiri::HTML::DocumentFragment.parse text
13
- length = doc.inner_text =~ Regexp.new(separator)
14
- if length
15
- doc.truncate(length - 1, '').inner_html
16
- else
17
- text
18
- end
12
+ doc = Nokogiri::HTML::DocumentFragment.parse text.split(separator).first
13
+ doc.inner_html
19
14
  end
20
15
 
21
16
  def self.truncate_at_length(text, max_length, ellipsis = "...")
@@ -24,7 +19,7 @@ module TruncateHTML
24
19
  doc = Nokogiri::HTML::DocumentFragment.parse text
25
20
  content_length = doc.inner_text.length
26
21
  actual_length = max_length - ellipsis_length
27
- if content_length > actual_length
22
+ if content_length > actual_length
28
23
  doc.truncate(actual_length, ellipsis).inner_html
29
24
  else
30
25
  text
@@ -70,4 +65,4 @@ end
70
65
  Nokogiri::HTML::DocumentFragment.send(:include, NokogiriTruncator::NodeWithChildren)
71
66
  Nokogiri::XML::Element.send(:include, NokogiriTruncator::NodeWithChildren)
72
67
  Nokogiri::XML::Text.send(:include, NokogiriTruncator::TextNode)
73
- Nokogiri::XML::Comment.send(:include, NokogiriTruncator::CommentNode)
68
+ Nokogiri::XML::Comment.send(:include, NokogiriTruncator::CommentNode)
@@ -4,18 +4,22 @@ require 'active_support/inflector'
4
4
  require 'active_support/inflector/transliterate'
5
5
 
6
6
  module Middleman
7
+
7
8
  module Blog
9
+
8
10
  # Handy methods for dealing with URI templates. Mix into whatever class.
9
11
  module UriTemplates
10
12
 
11
13
  module_function
12
14
 
13
- # Given a URI template string, make an Addressable::Template
14
- # This supports the legacy middleman-blog/Sinatra style :colon
15
- # URI templates as well as RFC6570 templates.
15
+ ##
16
+ # Given a URI template string, make an Addressable::Template This supports
17
+ # the legacy middleman-blog/Sinatra style :colon URI templates as well as
18
+ # RFC6570 templates.
16
19
  #
17
20
  # @param [String] tmpl_src URI template source
18
21
  # @return [Addressable::Template] a URI template
22
+ ##
19
23
  def uri_template(tmpl_src)
20
24
  # Support the RFC6470 templates directly if people use them
21
25
  if tmpl_src.include?(':')
@@ -25,65 +29,73 @@ module Middleman
25
29
  Addressable::Template.new ::Middleman::Util.normalize_path(tmpl_src)
26
30
  end
27
31
 
32
+ ##
28
33
  # Apply a URI template with the given data, producing a normalized
29
34
  # Middleman path.
30
35
  #
31
36
  # @param [Addressable::Template] template
32
37
  # @param [Hash] data
33
38
  # @return [String] normalized path
39
+ ##
34
40
  def apply_uri_template(template, data)
35
41
  ::Middleman::Util.normalize_path Addressable::URI.unencode(template.expand(data)).to_s
36
42
  end
37
43
 
44
+ ##
38
45
  # Use a template to extract parameters from a path, and validate some special (date)
39
46
  # keys. Returns nil if the special keys don't match.
40
47
  #
41
48
  # @param [Addressable::Template] template
42
49
  # @param [String] path
50
+ ##
43
51
  def extract_params(template, path)
44
52
  template.extract(path, BlogTemplateProcessor)
45
53
  end
46
54
 
47
- # Parameterize a string preserving any multibyte characters
55
+ ##
56
+ # Parametrize a string preserving any multi-byte characters
57
+ # Reimplementation of this, preserves un-transliterate-able multibyte chars.
58
+ #
59
+ # @see http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize
60
+ ##
48
61
  def safe_parameterize(str)
49
- sep = '-'
50
-
51
- # Reimplementation of http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize that preserves un-transliterate-able multibyte chars.
52
- parameterized_string = ActiveSupport::Inflector.transliterate(str.to_s).downcase
53
- parameterized_string.gsub!(/[^a-z0-9\-_\?]+/, sep)
54
-
55
- parameterized_string.chars.to_a.each_with_index do |char, i|
56
- if char == '?' && str[i].bytes.count != 1
57
- parameterized_string[i] = str[i]
58
- end
59
- end
60
-
61
- re_sep = Regexp.escape(sep)
62
- # No more than one of the separator in a row.
63
- parameterized_string.gsub!(/#{re_sep}{2,}/, sep)
64
- # Remove leading/trailing separator.
65
- parameterized_string.gsub!(/^#{re_sep}|#{re_sep}$/, '')
66
-
67
- parameterized_string
62
+ parameterized_string = ::ActiveSupport::Inflector.transliterate(str.to_s)
63
+ parameterized_string.parameterize
68
64
  end
69
65
 
70
- # Convert a date into a hash of components to strings
71
- # suitable for using in a URL template.
66
+ ##
67
+ # Convert a date into a hash of components to strings suitable for using
68
+ # in a URL template.
69
+ #
72
70
  # @param [DateTime] date
73
71
  # @return [Hash] parameters
72
+ ##
74
73
  def date_to_params(date)
75
74
  return {
76
75
  year: date.year.to_s,
77
- month: date.month.to_s.rjust(2,'0'),
78
- day: date.day.to_s.rjust(2,'0')
76
+ month: date.month.to_s.rjust(2, '0'),
77
+ day: date.day.to_s.rjust(2, '0')
79
78
  }
80
79
  end
80
+
81
+ ##
82
+ #
83
+ ##
84
+ def extract_directory_path( article_path )
85
+ uri = Addressable::URI.parse article_path
86
+
87
+ # Remove file extension from the article path
88
+ directory_path = uri.path.gsub( uri.extname, '' )
89
+ end
90
+
81
91
  end
82
92
 
83
- # A special template processor that validates date fields
84
- # and has an extra-permissive default regex.
93
+ ##
94
+ # A special template processor that validates date fields and has an extra-
95
+ # permissive default regex.
85
96
  #
86
- # See https://github.com/sporkmonger/addressable/blob/master/lib/addressable/template.rb#L279
97
+ # @see https://github.com/sporkmonger/addressable/blob/master/lib/addressable/template.rb#L279
98
+ ##
87
99
  class BlogTemplateProcessor
88
100
  def self.match(name)
89
101
  case name
@@ -94,5 +106,7 @@ module Middleman
94
106
  end
95
107
  end
96
108
  end
109
+
97
110
  end
111
+
98
112
  end
@@ -1,5 +1,7 @@
1
1
  module Middleman
2
+
2
3
  module Blog
3
- VERSION = "4.0.1"
4
+ VERSION = '4.0.2'
4
5
  end
6
+
5
7
  end
@@ -1,23 +1,25 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "middleman-blog/version"
2
+ $:.push File.expand_path('../lib', __FILE__)
3
+ require 'middleman-blog/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "middleman-blog"
7
- s.version = Middleman::Blog::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Thomas Reynolds", "Ben Hollis"]
10
- s.email = ["me@tdreyno.com", "ben@benhollis.net"]
11
- s.homepage = "https://github.com/middleman/middleman-blog"
12
- s.summary = %q{Blog engine for Middleman}
13
- s.description = %q{Blog engine for Middleman}
14
- s.license = "MIT"
15
- s.files = `git ls-files -z`.split("\0")
16
- s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
17
- s.require_paths = ["lib"]
6
+
7
+ s.name = 'middleman-blog'
8
+ s.version = Middleman::Blog::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ['Thomas Reynolds', 'Ben Hollis', 'Ian Warner']
11
+ s.email = ['me@tdreyno.com', 'ben@benhollis.net', 'ian.warner@drykiss.com']
12
+ s.homepage = 'https://github.com/middleman/middleman-blog'
13
+ s.summary = %q{ Blog engine for Middleman }
14
+ s.description = %q{ Blog engine for Middleman }
15
+ s.license = 'MIT'
16
+ s.files = `git ls-files -z`.split("\0")
17
+ s.test_files = `git ls-files -z -- {fixtures,features}/*`.split("\0")
18
+ s.require_paths = ['lib']
18
19
  s.required_ruby_version = '>= 2.0.0'
19
20
 
20
- s.add_dependency("middleman-core", [">= 4.0.0"])
21
- s.add_dependency("tzinfo", [">= 0.3.0"])
22
- s.add_dependency("addressable", ["~> 2.3"])
21
+ s.add_dependency('middleman-core', ['~> 4.0'])
22
+ s.add_dependency('tzinfo', ['>= 0.3.0'])
23
+ s.add_dependency('addressable', ['~> 2.3'])
24
+
23
25
  end
@@ -1,5 +1,5 @@
1
1
  require 'simplecov'
2
- SimpleCov.root(File.expand_path(File.dirname(__FILE__) + '/..'))
2
+ SimpleCov.root( File.expand_path( File.dirname( __FILE__ ) + '/..' ) )
3
3
 
4
4
  require 'coveralls'
5
5
  Coveralls.wear!
@@ -33,11 +33,11 @@ describe 'Middleman::Blog::UriTemplates' do
33
33
  template = uri_template('{year}/{month}/{day}/{title}/{+path}')
34
34
  params = extract_params(template, '2013/12/13/foo-bar/foo/bar.html')
35
35
 
36
- expect(params['year']) == '2013'
36
+ expect(params['year']) == '2013'
37
37
  expect(params['month']) == '12'
38
- expect(params['day']) == '13'
38
+ expect(params['day']) == '13'
39
39
  expect(params['title']) == 'foo-bar'
40
- expect(params['path']) == 'foo/bar.html'
40
+ expect(params['path']) == 'foo/bar.html'
41
41
  end
42
42
 
43
43
  it 'returns nil if there is no match' do
@@ -54,11 +54,26 @@ describe 'Middleman::Blog::UriTemplates' do
54
54
  template = uri_template('{year}/{month}/{day}/{title}/{+path}')
55
55
  params = extract_params(template, '2013/12/13/foo - bar/foo/bar.html')
56
56
 
57
- expect(params['year']) == '2013'
57
+ expect(params['year']) == '2013'
58
58
  expect(params['month']) == '12'
59
- expect(params['day']) == '13'
59
+ expect(params['day']) == '13'
60
60
  expect(params['title']) == 'foo - bar'
61
- expect(params['path']) == 'foo/bar.html'
61
+ expect(params['path']) == 'foo/bar.html'
62
62
  end
63
63
  end
64
+
65
+ describe 'extract_directory_path' do
66
+
67
+ it 'can extract a directory path' do
68
+
69
+ template = uri_template( '{year}/{month}/{day}/{title}/{+path}' )
70
+ params = extract_params( template, '2013/12/13/foo-bar/foo/bar.html' )
71
+ article_path = apply_uri_template template, params
72
+
73
+ expect( extract_directory_path( article_path ) ) == '2013-12-13-foo-bar-foo-bar'
74
+
75
+ end
76
+
77
+ end
78
+
64
79
  end
metadata CHANGED
@@ -1,30 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
8
8
  - Ben Hollis
9
+ - Ian Warner
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2016-04-12 00:00:00.000000000 Z
13
+ date: 2017-05-22 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: middleman-core
16
17
  requirement: !ruby/object:Gem::Requirement
17
18
  requirements:
18
- - - ">="
19
+ - - "~>"
19
20
  - !ruby/object:Gem::Version
20
- version: 4.0.0
21
+ version: '4.0'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
- - - ">="
26
+ - - "~>"
26
27
  - !ruby/object:Gem::Version
27
- version: 4.0.0
28
+ version: '4.0'
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: tzinfo
30
31
  requirement: !ruby/object:Gem::Requirement
@@ -53,21 +54,23 @@ dependencies:
53
54
  - - "~>"
54
55
  - !ruby/object:Gem::Version
55
56
  version: '2.3'
56
- description: Blog engine for Middleman
57
+ description: " Blog engine for Middleman "
57
58
  email:
58
59
  - me@tdreyno.com
59
60
  - ben@benhollis.net
61
+ - ian.warner@drykiss.com
60
62
  executables: []
61
63
  extensions: []
62
64
  extra_rdoc_files: []
63
65
  files:
64
- - ".gemtest"
66
+ - ".editorconfig"
65
67
  - ".gitignore"
66
68
  - ".travis.yml"
67
69
  - ".yardopts"
68
70
  - CHANGELOG.md
69
71
  - CONTRIBUTING.md
70
72
  - Gemfile
73
+ - ISSUE_TEMPLATE.md
71
74
  - LICENSE.md
72
75
  - README.md
73
76
  - Rakefile
@@ -87,10 +90,9 @@ files:
87
90
  - features/layouts.feature
88
91
  - features/multiblog.feature
89
92
  - features/next_previous.feature
90
- - features/no_date.feature
91
93
  - features/paginate.feature
92
94
  - features/paginate_multiblog.feature
93
- - features/permalink-data.feature
95
+ - features/permalink.feature
94
96
  - features/preview.feature
95
97
  - features/published.feature
96
98
  - features/summary.feature
@@ -99,21 +101,33 @@ files:
99
101
  - features/tags.feature
100
102
  - features/tags_multiblog.feature
101
103
  - features/time_zone.feature
104
+ - fixtures/article-dirs-app/config-directory-indexes.rb
105
+ - fixtures/article-dirs-app/config-permalink-with-dot.rb
102
106
  - fixtures/article-dirs-app/config.rb
103
107
  - fixtures/article-dirs-app/source/blog/2011-01-01-new-article.html.markdown
104
108
  - fixtures/article-dirs-app/source/blog/2011-01-01-new-article/example.txt
105
109
  - fixtures/article-dirs-app/source/index.html.erb
106
110
  - fixtures/article-dirs-app/source/layout.erb
107
111
  - fixtures/blog-sources-app/config.rb
108
- - fixtures/blog-sources-app/source/_article_template.erb
109
112
  - fixtures/blog-sources-app/source/blog/2011-01-01-new-article.html.markdown
110
113
  - fixtures/blog-sources-app/source/blog/2013-08-08-slug-from-filename.html.markdown
111
114
  - fixtures/blog-sources-app/source/index.html.erb
112
115
  - fixtures/blog-sources-app/source/layout.erb
116
+ - fixtures/blog-sources-no-date-app/config.rb
117
+ - fixtures/blog-sources-no-date-app/source/blog/new-article.html.markdown
118
+ - fixtures/blog-sources-no-date-app/source/index.html.erb
119
+ - fixtures/blog-sources-no-date-app/source/layout.erb
120
+ - fixtures/blog-sources-no-day-app/config.rb
121
+ - fixtures/blog-sources-no-day-app/source/2012-08-testing.html.markdown
122
+ - fixtures/blog-sources-no-day-app/source/layout.erb
123
+ - fixtures/blog-sources-no-title-app/config.rb
124
+ - fixtures/blog-sources-no-title-app/source/2013-08-07.html.markdown
125
+ - fixtures/blog-sources-no-title-app/source/2013-08-08.html.markdown
126
+ - fixtures/blog-sources-no-title-app/source/layout.erb
113
127
  - fixtures/blog-sources-subdirs-app/config.rb
114
128
  - fixtures/blog-sources-subdirs-app/source/blog.html.erb
115
- - fixtures/blog-sources-subdirs-app/source/blog/another-post.html.md.erb
116
- - fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.md.erb
129
+ - fixtures/blog-sources-subdirs-app/source/blog/another-post.html.markdown
130
+ - fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.markdown
117
131
  - fixtures/blog-sources-subdirs-app/source/layout.erb
118
132
  - fixtures/calendar-and-tag-app/config-directory-indexes.rb
119
133
  - fixtures/calendar-and-tag-app/config.rb
@@ -207,14 +221,19 @@ files:
207
221
  - fixtures/language-app/config.rb
208
222
  - fixtures/language-app/locales/en.yml
209
223
  - fixtures/language-app/locales/ru.yml
224
+ - fixtures/language-app/source/2013-09-05-previous-english-article.html.erb
225
+ - fixtures/language-app/source/2013-09-06-previous-russian-article.html.erb
210
226
  - fixtures/language-app/source/2013-09-07-english-article-with-lang-in-frontmatter.html.erb
211
227
  - fixtures/language-app/source/2013-09-07-russian-article-with-lang-in-frontmatter.html.erb
228
+ - fixtures/language-app/source/2013-09-08-next-russian-article.html.erb
229
+ - fixtures/language-app/source/2013-09-09-next-english-article.html.erb
212
230
  - fixtures/language-app/source/en/2013-09-07-english-article-with-lang-in-path.html.erb
213
231
  - fixtures/language-app/source/layouts/layout.erb
214
232
  - fixtures/language-app/source/localizable/index.html.erb
215
233
  - fixtures/language-app/source/ru/2013-09-07-russian-article-with-lang-in-path.html.erb
216
234
  - fixtures/layouts-app/config.rb
217
235
  - fixtures/layouts-app/source/2011/01/01/first-article.html.markdown
236
+ - fixtures/layouts-app/source/2011/01/01/fourth-article.html.markdown
218
237
  - fixtures/layouts-app/source/2011/01/01/second-article.html.markdown
219
238
  - fixtures/layouts-app/source/2011/01/01/third-article.html.markdown
220
239
  - fixtures/layouts-app/source/2011/01/02/article-in-normal-layout.html.markdown
@@ -229,18 +248,6 @@ files:
229
248
  - fixtures/multiblog-app/source/blog2/2011/01/01/new-article.html.markdown
230
249
  - fixtures/multiblog-app/source/index.html.erb
231
250
  - fixtures/multiblog-app/source/layout.erb
232
- - fixtures/no-date-app/config.rb
233
- - fixtures/no-date-app/source/_article_template.erb
234
- - fixtures/no-date-app/source/blog/new-article.html.markdown
235
- - fixtures/no-date-app/source/index.html.erb
236
- - fixtures/no-date-app/source/layout.erb
237
- - fixtures/no-day-app/config.rb
238
- - fixtures/no-day-app/source/2012-08-testing.html.markdown
239
- - fixtures/no-day-app/source/layout.erb
240
- - fixtures/no-title-app/config.rb
241
- - fixtures/no-title-app/source/2013-08-07.html.markdown
242
- - fixtures/no-title-app/source/2013-08-08.html.markdown
243
- - fixtures/no-title-app/source/layout.erb
244
251
  - fixtures/paginate-app/config-directory-indexes.rb
245
252
  - fixtures/paginate-app/config-paginate-off.rb
246
253
  - fixtures/paginate-app/config.rb
@@ -287,10 +294,10 @@ files:
287
294
  - fixtures/paginate-multiblog-app/source/tag1.html.erb
288
295
  - fixtures/paginate-multiblog-app/source/tag2.html.erb
289
296
  - fixtures/paginate-multiblog-app/source/tag3.html.erb
290
- - fixtures/permalink-data-app/config.rb
291
- - fixtures/permalink-data-app/source/index.html.erb
292
- - fixtures/permalink-data-app/source/layout.erb
293
- - fixtures/permalink-data-app/source/news/2011-01-01-new-article.html.markdown
297
+ - fixtures/permalink-app/config.rb
298
+ - fixtures/permalink-app/source/index.html.erb
299
+ - fixtures/permalink-app/source/layout.erb
300
+ - fixtures/permalink-app/source/news/2011-01-01-new-article.html.markdown
294
301
  - fixtures/preview-app/config.rb
295
302
  - fixtures/preview-app/source/2011/01/01/new-article.html.markdown
296
303
  - fixtures/preview-app/source/index.html.erb
@@ -307,12 +314,15 @@ files:
307
314
  - fixtures/summary-app/source/2011-01-01-article-with-standard-summary-separator.html.markdown
308
315
  - fixtures/summary-app/source/2012-06-19-article-with-no-summary-separator.html.markdown
309
316
  - fixtures/summary-app/source/2013-05-08-article-with-custom-separator.html.markdown
317
+ - fixtures/summary-app/source/2016-05-21-article-with-comment-separator.html.markdown
310
318
  - fixtures/summary-app/source/index.html.erb
311
319
  - fixtures/tags-app/config-directory-indexes.rb
320
+ - fixtures/tags-app/config-filters.rb
312
321
  - fixtures/tags-app/config-no-tags.rb
313
322
  - fixtures/tags-app/config.rb
314
323
  - fixtures/tags-app/source/blog/2011-01-01-new-article.html.markdown
315
324
  - fixtures/tags-app/source/blog/2011-01-02-another-article.html.markdown
325
+ - fixtures/tags-app/source/blog/2011-01-03-no-taga.html.markdown
316
326
  - fixtures/tags-app/source/index.html.erb
317
327
  - fixtures/tags-app/source/layout.erb
318
328
  - fixtures/tags-app/source/tag.html.erb
@@ -369,7 +379,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
379
  version: '0'
370
380
  requirements: []
371
381
  rubyforge_project:
372
- rubygems_version: 2.4.8
382
+ rubygems_version: 2.6.11
373
383
  signing_key:
374
384
  specification_version: 4
375
385
  summary: Blog engine for Middleman
@@ -390,10 +400,9 @@ test_files:
390
400
  - features/layouts.feature
391
401
  - features/multiblog.feature
392
402
  - features/next_previous.feature
393
- - features/no_date.feature
394
403
  - features/paginate.feature
395
404
  - features/paginate_multiblog.feature
396
- - features/permalink-data.feature
405
+ - features/permalink.feature
397
406
  - features/preview.feature
398
407
  - features/published.feature
399
408
  - features/summary.feature
@@ -402,21 +411,33 @@ test_files:
402
411
  - features/tags.feature
403
412
  - features/tags_multiblog.feature
404
413
  - features/time_zone.feature
414
+ - fixtures/article-dirs-app/config-directory-indexes.rb
415
+ - fixtures/article-dirs-app/config-permalink-with-dot.rb
405
416
  - fixtures/article-dirs-app/config.rb
406
417
  - fixtures/article-dirs-app/source/blog/2011-01-01-new-article.html.markdown
407
418
  - fixtures/article-dirs-app/source/blog/2011-01-01-new-article/example.txt
408
419
  - fixtures/article-dirs-app/source/index.html.erb
409
420
  - fixtures/article-dirs-app/source/layout.erb
410
421
  - fixtures/blog-sources-app/config.rb
411
- - fixtures/blog-sources-app/source/_article_template.erb
412
422
  - fixtures/blog-sources-app/source/blog/2011-01-01-new-article.html.markdown
413
423
  - fixtures/blog-sources-app/source/blog/2013-08-08-slug-from-filename.html.markdown
414
424
  - fixtures/blog-sources-app/source/index.html.erb
415
425
  - fixtures/blog-sources-app/source/layout.erb
426
+ - fixtures/blog-sources-no-date-app/config.rb
427
+ - fixtures/blog-sources-no-date-app/source/blog/new-article.html.markdown
428
+ - fixtures/blog-sources-no-date-app/source/index.html.erb
429
+ - fixtures/blog-sources-no-date-app/source/layout.erb
430
+ - fixtures/blog-sources-no-day-app/config.rb
431
+ - fixtures/blog-sources-no-day-app/source/2012-08-testing.html.markdown
432
+ - fixtures/blog-sources-no-day-app/source/layout.erb
433
+ - fixtures/blog-sources-no-title-app/config.rb
434
+ - fixtures/blog-sources-no-title-app/source/2013-08-07.html.markdown
435
+ - fixtures/blog-sources-no-title-app/source/2013-08-08.html.markdown
436
+ - fixtures/blog-sources-no-title-app/source/layout.erb
416
437
  - fixtures/blog-sources-subdirs-app/config.rb
417
438
  - fixtures/blog-sources-subdirs-app/source/blog.html.erb
418
- - fixtures/blog-sources-subdirs-app/source/blog/another-post.html.md.erb
419
- - fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.md.erb
439
+ - fixtures/blog-sources-subdirs-app/source/blog/another-post.html.markdown
440
+ - fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.markdown
420
441
  - fixtures/blog-sources-subdirs-app/source/layout.erb
421
442
  - fixtures/calendar-and-tag-app/config-directory-indexes.rb
422
443
  - fixtures/calendar-and-tag-app/config.rb
@@ -510,14 +531,19 @@ test_files:
510
531
  - fixtures/language-app/config.rb
511
532
  - fixtures/language-app/locales/en.yml
512
533
  - fixtures/language-app/locales/ru.yml
534
+ - fixtures/language-app/source/2013-09-05-previous-english-article.html.erb
535
+ - fixtures/language-app/source/2013-09-06-previous-russian-article.html.erb
513
536
  - fixtures/language-app/source/2013-09-07-english-article-with-lang-in-frontmatter.html.erb
514
537
  - fixtures/language-app/source/2013-09-07-russian-article-with-lang-in-frontmatter.html.erb
538
+ - fixtures/language-app/source/2013-09-08-next-russian-article.html.erb
539
+ - fixtures/language-app/source/2013-09-09-next-english-article.html.erb
515
540
  - fixtures/language-app/source/en/2013-09-07-english-article-with-lang-in-path.html.erb
516
541
  - fixtures/language-app/source/layouts/layout.erb
517
542
  - fixtures/language-app/source/localizable/index.html.erb
518
543
  - fixtures/language-app/source/ru/2013-09-07-russian-article-with-lang-in-path.html.erb
519
544
  - fixtures/layouts-app/config.rb
520
545
  - fixtures/layouts-app/source/2011/01/01/first-article.html.markdown
546
+ - fixtures/layouts-app/source/2011/01/01/fourth-article.html.markdown
521
547
  - fixtures/layouts-app/source/2011/01/01/second-article.html.markdown
522
548
  - fixtures/layouts-app/source/2011/01/01/third-article.html.markdown
523
549
  - fixtures/layouts-app/source/2011/01/02/article-in-normal-layout.html.markdown
@@ -532,18 +558,6 @@ test_files:
532
558
  - fixtures/multiblog-app/source/blog2/2011/01/01/new-article.html.markdown
533
559
  - fixtures/multiblog-app/source/index.html.erb
534
560
  - fixtures/multiblog-app/source/layout.erb
535
- - fixtures/no-date-app/config.rb
536
- - fixtures/no-date-app/source/_article_template.erb
537
- - fixtures/no-date-app/source/blog/new-article.html.markdown
538
- - fixtures/no-date-app/source/index.html.erb
539
- - fixtures/no-date-app/source/layout.erb
540
- - fixtures/no-day-app/config.rb
541
- - fixtures/no-day-app/source/2012-08-testing.html.markdown
542
- - fixtures/no-day-app/source/layout.erb
543
- - fixtures/no-title-app/config.rb
544
- - fixtures/no-title-app/source/2013-08-07.html.markdown
545
- - fixtures/no-title-app/source/2013-08-08.html.markdown
546
- - fixtures/no-title-app/source/layout.erb
547
561
  - fixtures/paginate-app/config-directory-indexes.rb
548
562
  - fixtures/paginate-app/config-paginate-off.rb
549
563
  - fixtures/paginate-app/config.rb
@@ -590,10 +604,10 @@ test_files:
590
604
  - fixtures/paginate-multiblog-app/source/tag1.html.erb
591
605
  - fixtures/paginate-multiblog-app/source/tag2.html.erb
592
606
  - fixtures/paginate-multiblog-app/source/tag3.html.erb
593
- - fixtures/permalink-data-app/config.rb
594
- - fixtures/permalink-data-app/source/index.html.erb
595
- - fixtures/permalink-data-app/source/layout.erb
596
- - fixtures/permalink-data-app/source/news/2011-01-01-new-article.html.markdown
607
+ - fixtures/permalink-app/config.rb
608
+ - fixtures/permalink-app/source/index.html.erb
609
+ - fixtures/permalink-app/source/layout.erb
610
+ - fixtures/permalink-app/source/news/2011-01-01-new-article.html.markdown
597
611
  - fixtures/preview-app/config.rb
598
612
  - fixtures/preview-app/source/2011/01/01/new-article.html.markdown
599
613
  - fixtures/preview-app/source/index.html.erb
@@ -610,12 +624,15 @@ test_files:
610
624
  - fixtures/summary-app/source/2011-01-01-article-with-standard-summary-separator.html.markdown
611
625
  - fixtures/summary-app/source/2012-06-19-article-with-no-summary-separator.html.markdown
612
626
  - fixtures/summary-app/source/2013-05-08-article-with-custom-separator.html.markdown
627
+ - fixtures/summary-app/source/2016-05-21-article-with-comment-separator.html.markdown
613
628
  - fixtures/summary-app/source/index.html.erb
614
629
  - fixtures/tags-app/config-directory-indexes.rb
630
+ - fixtures/tags-app/config-filters.rb
615
631
  - fixtures/tags-app/config-no-tags.rb
616
632
  - fixtures/tags-app/config.rb
617
633
  - fixtures/tags-app/source/blog/2011-01-01-new-article.html.markdown
618
634
  - fixtures/tags-app/source/blog/2011-01-02-another-article.html.markdown
635
+ - fixtures/tags-app/source/blog/2011-01-03-no-taga.html.markdown
619
636
  - fixtures/tags-app/source/index.html.erb
620
637
  - fixtures/tags-app/source/layout.erb
621
638
  - fixtures/tags-app/source/tag.html.erb
@@ -634,4 +651,3 @@ test_files:
634
651
  - fixtures/tags-multiblog-app/source/tag2.html.erb
635
652
  - fixtures/time-zone-app/config.rb
636
653
  - fixtures/time-zone-app/source/blog/2013-06-24-hello.html.erb
637
- has_rdoc: