middleman-blog 4.0.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +25 -0
  3. data/.github/workflows/stale.yml +21 -0
  4. data/CHANGELOG.md +72 -60
  5. data/Gemfile +15 -24
  6. data/README.md +20 -30
  7. data/Rakefile +8 -14
  8. data/features/support/env.rb +2 -0
  9. data/features/support/time_steps.rb +9 -7
  10. data/features/tags.feature +4 -0
  11. data/fixtures/article-dirs-app/config-directory-indexes.rb +2 -0
  12. data/fixtures/article-dirs-app/config-permalink-with-dot.rb +2 -0
  13. data/fixtures/article-dirs-app/config.rb +2 -0
  14. data/fixtures/blog-sources-app/config.rb +2 -0
  15. data/fixtures/blog-sources-no-date-app/config.rb +2 -0
  16. data/fixtures/blog-sources-no-day-app/config.rb +2 -0
  17. data/fixtures/blog-sources-no-title-app/config.rb +2 -0
  18. data/fixtures/blog-sources-subdirs-app/config.rb +2 -0
  19. data/fixtures/calendar-and-tag-app/config-directory-indexes.rb +2 -0
  20. data/fixtures/calendar-and-tag-app/config.rb +2 -0
  21. data/fixtures/calendar-app/config-directory-indexes.rb +2 -0
  22. data/fixtures/calendar-app/config-only-year.rb +2 -0
  23. data/fixtures/calendar-app/config.rb +2 -0
  24. data/fixtures/calendar-multiblog-app/config.rb +2 -0
  25. data/fixtures/custom-article-template-app/config.rb +2 -0
  26. data/fixtures/custom-collections-app/config-blog-prefix.rb +2 -0
  27. data/fixtures/custom-collections-app/config-directory-indexes.rb +2 -0
  28. data/fixtures/custom-collections-app/config.rb +2 -0
  29. data/fixtures/custom-collections-multiblog-app/config.rb +2 -0
  30. data/fixtures/custom-collections-sources-app/config.rb +2 -0
  31. data/fixtures/custom-permalinks-app/config-directory-indexes.rb +2 -0
  32. data/fixtures/custom-permalinks-app/config.rb +2 -0
  33. data/fixtures/filename-date-app/config.rb +2 -0
  34. data/fixtures/future-date-app/config.rb +2 -0
  35. data/fixtures/indexes-app/config.rb +2 -0
  36. data/fixtures/lang-path-app/config.rb +2 -0
  37. data/fixtures/language-app/config.rb +3 -1
  38. data/fixtures/layouts-app/config.rb +2 -0
  39. data/fixtures/paginate-app/config-directory-indexes.rb +2 -0
  40. data/fixtures/paginate-app/config-paginate-off.rb +2 -0
  41. data/fixtures/paginate-app/config.rb +2 -0
  42. data/fixtures/paginate-multiblog-app/config.rb +2 -0
  43. data/fixtures/permalink-app/config.rb +2 -0
  44. data/fixtures/preview-app/config.rb +2 -0
  45. data/fixtures/published-app/config.rb +2 -0
  46. data/fixtures/summary-app/config.rb +2 -0
  47. data/fixtures/tags-app/config-directory-indexes.rb +2 -0
  48. data/fixtures/tags-app/config-filters.rb +2 -0
  49. data/fixtures/tags-app/config-no-tags.rb +2 -0
  50. data/fixtures/tags-app/config.rb +2 -0
  51. data/fixtures/tags-app/source/blog/2011-01-01-new-article.html.markdown +1 -1
  52. data/fixtures/tags-app/source/blog/2011-01-02-another-article.html.markdown +1 -0
  53. data/fixtures/tags-multiblog-app/config.rb +2 -0
  54. data/fixtures/time-zone-app/config.rb +2 -0
  55. data/lib/middleman-blog/blog_article.rb +6 -7
  56. data/lib/middleman-blog/blog_data.rb +3 -7
  57. data/lib/middleman-blog/calendar_pages.rb +8 -6
  58. data/lib/middleman-blog/commands/article.rb +7 -5
  59. data/lib/middleman-blog/commands/article.tt +2 -2
  60. data/lib/middleman-blog/custom_pages.rb +2 -0
  61. data/lib/middleman-blog/extension.rb +16 -12
  62. data/lib/middleman-blog/helpers.rb +4 -2
  63. data/lib/middleman-blog/paginator.rb +3 -1
  64. data/lib/middleman-blog/tag_pages.rb +2 -0
  65. data/lib/middleman-blog/truncate_html.rb +7 -5
  66. data/lib/middleman-blog/uri_templates.rb +8 -2
  67. data/lib/middleman-blog/version.rb +3 -1
  68. data/lib/middleman-blog.rb +2 -0
  69. data/lib/middleman_extension.rb +2 -0
  70. data/middleman-blog.gemspec +15 -22
  71. data/spec/spec_helper.rb +3 -1
  72. data/spec/uri_templates_spec.rb +2 -0
  73. metadata +11 -34
  74. data/.rubocop.yml +0 -69
  75. data/.travis.yml +0 -30
  76. data/Gemfile-4.x +0 -38
  77. data/fixtures/default-template-app/Gemfile +0 -6
  78. data/fixtures/default-template-app/config.rb +0 -35
  79. data/fixtures/default-template-app/source/2013-04-01-new-article.html.markdown +0 -25
  80. data/fixtures/default-template-app/source/about-me.html.erb +0 -0
  81. data/fixtures/default-template-app/source/archives.html.erb +0 -10
  82. data/fixtures/default-template-app/source/index.html.erb +0 -11
  83. data/fixtures/default-template-app/source/javascripts/_zepto.pjax.js +0 -744
  84. data/fixtures/default-template-app/source/javascripts/app.js +0 -11
  85. data/fixtures/default-template-app/source/javascripts/modernizr.js +0 -1
  86. data/fixtures/default-template-app/source/layouts/layout.erb +0 -62
  87. data/fixtures/default-template-app/source/stylesheets/app.css.scss +0 -109
  88. /data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
  89. /data/{ISSUE_TEMPLATE.md → .github/ISSUE_TEMPLATE.md} +0 -0
data/.rubocop.yml DELETED
@@ -1,69 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.3
3
- Include:
4
- - '**/*.rb'
5
- - '**/Rakefile'
6
- - '**/Gemfile'
7
- - '**/config.ru'
8
- Exclude:
9
- - 'vendor/**/*'
10
- - '**/tmp/**/*'
11
- - 'middleman-cli/lib/middleman-cli/templates/**/*'
12
- Security/YAMLLoad:
13
- Enabled: false
14
- Style/GuardClause:
15
- Enabled: false
16
- Metrics/LineLength:
17
- Enabled: false
18
- Metrics/MethodLength:
19
- Enabled: false
20
- Style/Documentation:
21
- Enabled: false
22
- Metrics/AbcSize:
23
- Enabled: false
24
- Metrics/CyclomaticComplexity:
25
- Enabled: false
26
- Metrics/BlockLength:
27
- Enabled: false
28
- Metrics/ModuleLength:
29
- Enabled: false
30
- Metrics/PerceivedComplexity:
31
- Enabled: false
32
- Metrics/ClassLength:
33
- Enabled: false
34
- Lint/AmbiguousRegexpLiteral:
35
- Enabled: false
36
- Lint/AmbiguousBlockAssociation:
37
- Enabled: false
38
- Lint/UriEscapeUnescape:
39
- Enabled: false
40
- Lint/HandleExceptions:
41
- Enabled: false
42
- Lint/ShadowedException:
43
- Enabled: false
44
- Naming/FileName:
45
- Enabled: false
46
- Naming/UncommunicativeMethodParamName:
47
- Enabled: false
48
- Naming/MemoizedInstanceVariableName:
49
- Enabled: false
50
- Naming/HeredocDelimiterNaming:
51
- Enabled: false
52
- Security/Eval:
53
- Enabled: false
54
- Style/RegexpLiteral:
55
- Enabled: false
56
- Style/ClassAndModuleChildren:
57
- Enabled: false
58
- Style/MissingRespondToMissing:
59
- Enabled: false
60
- Style/MethodMissingSuper:
61
- Enabled: false
62
- Style/FrozenStringLiteralComment:
63
- Enabled: false
64
- Style/EvalWithLocation:
65
- Enabled: false
66
- Style/ClassVars:
67
- Enabled: false
68
- Style/GlobalVars:
69
- Enabled: false
data/.travis.yml DELETED
@@ -1,30 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- rvm:
5
- - ruby-head
6
- - 2.6.0
7
- - 2.5.3
8
- - 2.4.5
9
- - 2.3.8
10
-
11
- os:
12
- - linux
13
-
14
- gemfile:
15
- - Gemfile
16
- - Gemfile-4.x
17
-
18
- matrix :
19
- fast_finish: true
20
- allow_failures:
21
- - rvm: ruby-head
22
-
23
- script: bundle exec rake test
24
-
25
- env:
26
- global:
27
- - TEST=true
28
-
29
- notifications:
30
- email: false
data/Gemfile-4.x DELETED
@@ -1,38 +0,0 @@
1
-
2
- source 'https://rubygems.org'
3
-
4
- # Middleman Gems
5
- gem 'middleman-cli', '~> 4.2'
6
- gem 'middleman-core', '~> 4.2'
7
-
8
- # Specify your gem's dependencies in middleman-blog.gemspec
9
- gemspec
10
-
11
- # Build and doc tools
12
- gem 'rake', '~> 12.3', require: false
13
- gem 'yard', '~> 0.9.11', require: false
14
-
15
- # Test tools
16
- gem 'aruba', '~> 0.14.0', require: false
17
- gem 'byebug'
18
- gem 'capybara', '~> 2.5.0', require: false
19
- gem 'cucumber', '~> 3.0', require: false
20
- gem 'rspec', '~> 3.0', require: false
21
-
22
- # Pry tools
23
- gem 'pry'
24
- gem 'pry-rescue'
25
- gem 'pry-stack_explorer'
26
-
27
- gem 'kramdown'
28
- gem 'nokogiri', '~> 1.9.1'
29
- gem 'timecop', '~> 0.6.3'
30
-
31
- # Code Quality
32
- gem 'rubocop', '~> 0.61.1', require: false
33
- gem 'simplecov', '~> 0.10', require: false
34
-
35
- # Set the ruby platform - not windows
36
- platforms :ruby do
37
- gem 'redcarpet', '~> 3.1' # Latest 3.4.0
38
- end
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'middleman', github: 'middleman/middleman'
4
- gem 'middleman-blog', github: 'middleman/middleman-blog'
5
- gem 'middleman-syntax', github: 'middleman/middleman-syntax'
6
- gem 'zurb-foundation', '~> 4.1.6'
@@ -1,35 +0,0 @@
1
- require 'zurb-foundation'
2
-
3
- spec = Gem::Specification.find_by_name('zurb-foundation')
4
- set :js_assets_paths, [File.join(spec.gem_dir, 'js')]
5
-
6
- activate :directory_indexes
7
-
8
- activate :blog
9
-
10
- set :blog_name, 'Deep Thoughts'
11
- set :blog_author, 'Nick Adams'
12
- set :blog_avatar, 'http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50'
13
- set :top_nav_title, title: 'Home', target: 'index.html'
14
- set :top_nav_items, [
15
- { title: 'About Me', target: 'about-me.html' },
16
- { title: 'Archives', target: 'archives.html' }
17
- # { :title => "Other Page", :target => "other-page.html" }
18
- ]
19
-
20
- helpers do
21
- def page_title
22
- title = blog_name.dup
23
- if current_page.data.title
24
- title << ": #{current_page.data.title}"
25
- elsif is_blog_article?
26
- title << ": #{current_article.title}"
27
- end
28
- title
29
- end
30
-
31
- def link_to_with_active(title, url, class_name = 'active')
32
- active_class = current_resource == sitemap.find_resource_by_path(url) ? class_name : ''
33
- link_to(title, url, class: active_class)
34
- end
35
- end
@@ -1,25 +0,0 @@
1
- ---
2
- title: "This is a headline for a blog post if it’s two lines long."
3
- ---
4
-
5
- Morbi dapibus scelerisque risus, non auctor enim varius vitae. Proin in eros tortor. Aliquam erat volutpat. Sed tempus mollis faucibus. Nunc nunc dolor, ullamcorper rhoncus malesuada in, consectetur vitae nisi. Nulla facilisi.
6
-
7
- ## Heading Example
8
-
9
- Quisque varius euismod tempor. Nullam nisi risus, tempor in auctor ac, tempor eget nisl. Pellentesque fermentum luctus sapien vel pretium. In hac habitasse platea dictumst. Aliquam ac purus nec enim imperdiet vehicula a a risus.
10
-
11
- ### Heading Example
12
-
13
- Quisque varius euismod tempor. Nullam nisi risus, tempor in auctor ac, tempor eget nisl. Pellentesque fermentum luctus sapien vel pretium. In hac habitasse platea dictumst. Aliquam ac purus nec enim imperdiet vehicula a a risus.
14
-
15
- #### Heading Example
16
-
17
- Quisque varius euismod tempor. Nullam nisi risus, tempor in auctor ac, tempor eget nisl. Pellentesque fermentum luctus sapien vel pretium. In hac habitasse platea dictumst. Aliquam ac purus nec enim imperdiet vehicula a a risus.
18
-
19
- ##### Heading Example
20
-
21
- Quisque varius euismod tempor. Nullam nisi risus, tempor in auctor ac, tempor eget nisl. Pellentesque fermentum luctus sapien vel pretium. In hac habitasse platea dictumst. Aliquam ac purus nec enim imperdiet vehicula a a risus.
22
-
23
- ###### Heading Example
24
-
25
- Quisque varius euismod tempor. Nullam nisi risus, tempor in auctor ac, tempor eget nisl. Pellentesque fermentum luctus sapien vel pretium. In hac habitasse platea dictumst. Aliquam ac purus nec enim imperdiet vehicula a a risus.
@@ -1,10 +0,0 @@
1
- <section id="recent">
2
- <h2>
3
- Archive
4
- </h2>
5
- <ul class="disc">
6
- <% blog.articles.each do |article| %>
7
- <li><a href="<%= article.url %>"><%= article.title %></a> <time><%= article.date.strftime('%b %e') %></time></li>
8
- <% end %>
9
- </ul>
10
- </section>
@@ -1,11 +0,0 @@
1
- <% blog.articles[0...5].each_with_index do |article, i| %>
2
- <article class="<%= (i == 0) ? 'first' : '' %>">
3
- <span><%= article.date.strftime('%b %e %Y') %></span>
4
-
5
- <h1><a href="<%= article.url %>"><%= article.title %></a></h1>
6
-
7
- <%= article.summary %>
8
-
9
- <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
10
- </article>
11
- <% end %>