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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +25 -0
- data/.github/workflows/stale.yml +21 -0
- data/CHANGELOG.md +72 -60
- data/Gemfile +15 -24
- data/README.md +20 -30
- data/Rakefile +8 -14
- data/features/support/env.rb +2 -0
- data/features/support/time_steps.rb +9 -7
- data/features/tags.feature +4 -0
- data/fixtures/article-dirs-app/config-directory-indexes.rb +2 -0
- data/fixtures/article-dirs-app/config-permalink-with-dot.rb +2 -0
- data/fixtures/article-dirs-app/config.rb +2 -0
- data/fixtures/blog-sources-app/config.rb +2 -0
- data/fixtures/blog-sources-no-date-app/config.rb +2 -0
- data/fixtures/blog-sources-no-day-app/config.rb +2 -0
- data/fixtures/blog-sources-no-title-app/config.rb +2 -0
- data/fixtures/blog-sources-subdirs-app/config.rb +2 -0
- data/fixtures/calendar-and-tag-app/config-directory-indexes.rb +2 -0
- data/fixtures/calendar-and-tag-app/config.rb +2 -0
- data/fixtures/calendar-app/config-directory-indexes.rb +2 -0
- data/fixtures/calendar-app/config-only-year.rb +2 -0
- data/fixtures/calendar-app/config.rb +2 -0
- data/fixtures/calendar-multiblog-app/config.rb +2 -0
- data/fixtures/custom-article-template-app/config.rb +2 -0
- data/fixtures/custom-collections-app/config-blog-prefix.rb +2 -0
- data/fixtures/custom-collections-app/config-directory-indexes.rb +2 -0
- data/fixtures/custom-collections-app/config.rb +2 -0
- data/fixtures/custom-collections-multiblog-app/config.rb +2 -0
- data/fixtures/custom-collections-sources-app/config.rb +2 -0
- data/fixtures/custom-permalinks-app/config-directory-indexes.rb +2 -0
- data/fixtures/custom-permalinks-app/config.rb +2 -0
- data/fixtures/filename-date-app/config.rb +2 -0
- data/fixtures/future-date-app/config.rb +2 -0
- data/fixtures/indexes-app/config.rb +2 -0
- data/fixtures/lang-path-app/config.rb +2 -0
- data/fixtures/language-app/config.rb +3 -1
- data/fixtures/layouts-app/config.rb +2 -0
- data/fixtures/paginate-app/config-directory-indexes.rb +2 -0
- data/fixtures/paginate-app/config-paginate-off.rb +2 -0
- data/fixtures/paginate-app/config.rb +2 -0
- data/fixtures/paginate-multiblog-app/config.rb +2 -0
- data/fixtures/permalink-app/config.rb +2 -0
- data/fixtures/preview-app/config.rb +2 -0
- data/fixtures/published-app/config.rb +2 -0
- data/fixtures/summary-app/config.rb +2 -0
- data/fixtures/tags-app/config-directory-indexes.rb +2 -0
- data/fixtures/tags-app/config-filters.rb +2 -0
- data/fixtures/tags-app/config-no-tags.rb +2 -0
- data/fixtures/tags-app/config.rb +2 -0
- data/fixtures/tags-app/source/blog/2011-01-01-new-article.html.markdown +1 -1
- data/fixtures/tags-app/source/blog/2011-01-02-another-article.html.markdown +1 -0
- data/fixtures/tags-multiblog-app/config.rb +2 -0
- data/fixtures/time-zone-app/config.rb +2 -0
- data/lib/middleman-blog/blog_article.rb +6 -7
- data/lib/middleman-blog/blog_data.rb +3 -7
- data/lib/middleman-blog/calendar_pages.rb +8 -6
- data/lib/middleman-blog/commands/article.rb +7 -5
- data/lib/middleman-blog/commands/article.tt +2 -2
- data/lib/middleman-blog/custom_pages.rb +2 -0
- data/lib/middleman-blog/extension.rb +16 -12
- data/lib/middleman-blog/helpers.rb +4 -2
- data/lib/middleman-blog/paginator.rb +3 -1
- data/lib/middleman-blog/tag_pages.rb +2 -0
- data/lib/middleman-blog/truncate_html.rb +7 -5
- data/lib/middleman-blog/uri_templates.rb +8 -2
- data/lib/middleman-blog/version.rb +3 -1
- data/lib/middleman-blog.rb +2 -0
- data/lib/middleman_extension.rb +2 -0
- data/middleman-blog.gemspec +15 -22
- data/spec/spec_helper.rb +3 -1
- data/spec/uri_templates_spec.rb +2 -0
- metadata +11 -34
- data/.rubocop.yml +0 -69
- data/.travis.yml +0 -30
- data/Gemfile-4.x +0 -38
- data/fixtures/default-template-app/Gemfile +0 -6
- data/fixtures/default-template-app/config.rb +0 -35
- data/fixtures/default-template-app/source/2013-04-01-new-article.html.markdown +0 -25
- data/fixtures/default-template-app/source/about-me.html.erb +0 -0
- data/fixtures/default-template-app/source/archives.html.erb +0 -10
- data/fixtures/default-template-app/source/index.html.erb +0 -11
- data/fixtures/default-template-app/source/javascripts/_zepto.pjax.js +0 -744
- data/fixtures/default-template-app/source/javascripts/app.js +0 -11
- data/fixtures/default-template-app/source/javascripts/modernizr.js +0 -1
- data/fixtures/default-template-app/source/layouts/layout.erb +0 -62
- data/fixtures/default-template-app/source/stylesheets/app.css.scss +0 -109
- /data/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +0 -0
- /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,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.
|
File without changes
|
@@ -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 »</a></div>
|
10
|
-
</article>
|
11
|
-
<% end %>
|