middleman-blog 4.0.1 → 4.0.3
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 +5 -5
- data/.editorconfig +16 -0
- data/.gitignore +5 -1
- data/.rubocop.yml +69 -0
- data/.travis.yml +20 -14
- data/.yardopts +2 -2
- data/CHANGELOG.md +51 -24
- data/CONTRIBUTING.md +5 -2
- data/Gemfile +21 -15
- data/Gemfile-4.x +38 -0
- data/ISSUE_TEMPLATE.md +14 -0
- data/LICENSE.md +15 -17
- data/README.md +52 -20
- data/Rakefile +13 -8
- data/features/article_dirs.feature +34 -0
- data/features/blog_sources.feature +35 -6
- data/features/filename_date.feature +4 -2
- data/features/language.feature +108 -77
- data/features/layouts.feature +3 -0
- data/features/multiblog.feature +1 -1
- data/features/next_previous.feature +10 -7
- data/features/permalink.feature +17 -0
- data/features/summary.feature +27 -6
- data/features/support/env.rb +8 -8
- data/features/support/time_steps.rb +5 -4
- data/features/tags.feature +67 -33
- data/fixtures/article-dirs-app/config-directory-indexes.rb +6 -0
- data/fixtures/article-dirs-app/config-permalink-with-dot.rb +6 -0
- data/fixtures/article-dirs-app/config.rb +2 -2
- data/fixtures/blog-sources-app/config.rb +2 -2
- data/fixtures/blog-sources-app/source/blog/2011-01-01-new-article.html.markdown +5 -3
- data/fixtures/blog-sources-app/source/blog/2013-08-08-slug-from-filename.html.markdown +5 -3
- data/fixtures/blog-sources-app/source/index.html.erb +12 -8
- data/fixtures/blog-sources-app/source/layout.erb +21 -10
- data/fixtures/blog-sources-no-date-app/config.rb +3 -0
- data/fixtures/blog-sources-no-date-app/source/blog/new-article.html.markdown +8 -0
- data/fixtures/blog-sources-no-date-app/source/index.html.erb +13 -0
- data/fixtures/blog-sources-no-date-app/source/layout.erb +24 -0
- data/fixtures/blog-sources-no-day-app/config.rb +3 -0
- data/fixtures/blog-sources-no-day-app/source/2012-08-testing.html.markdown +8 -0
- data/fixtures/blog-sources-no-day-app/source/layout.erb +24 -0
- data/fixtures/blog-sources-no-title-app/config.rb +3 -0
- data/fixtures/blog-sources-no-title-app/source/2013-08-07.html.markdown +8 -0
- data/fixtures/blog-sources-no-title-app/source/2013-08-08.html.markdown +9 -0
- data/fixtures/{no-date-app → blog-sources-no-title-app}/source/layout.erb +11 -0
- data/fixtures/blog-sources-subdirs-app/config.rb +2 -2
- data/fixtures/blog-sources-subdirs-app/source/blog/another-post.html.markdown +9 -0
- data/fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.markdown +9 -0
- data/fixtures/blog-sources-subdirs-app/source/blog.html.erb +6 -3
- data/fixtures/blog-sources-subdirs-app/source/layout.erb +24 -1
- data/fixtures/calendar-and-tag-app/config-directory-indexes.rb +3 -3
- data/fixtures/calendar-and-tag-app/config.rb +4 -4
- data/fixtures/calendar-app/config-directory-indexes.rb +3 -3
- data/fixtures/calendar-app/config-only-year.rb +3 -3
- data/fixtures/calendar-app/config.rb +3 -3
- data/fixtures/calendar-app/source/layout.erb +17 -12
- data/fixtures/calendar-multiblog-app/config.rb +12 -12
- data/fixtures/custom-collections-app/config-blog-prefix.rb +7 -7
- data/fixtures/custom-collections-app/config-directory-indexes.rb +6 -6
- data/fixtures/custom-collections-app/config.rb +6 -6
- data/fixtures/custom-collections-multiblog-app/config.rb +14 -14
- data/fixtures/custom-collections-sources-app/config.rb +5 -5
- data/fixtures/custom-permalinks-app/config-directory-indexes.rb +3 -3
- data/fixtures/custom-permalinks-app/config.rb +3 -3
- data/fixtures/default-template-app/Gemfile +5 -5
- data/fixtures/default-template-app/config.rb +11 -11
- data/fixtures/filename-date-app/config.rb +1 -1
- data/fixtures/future-date-app/config.rb +2 -2
- data/fixtures/indexes-app/config.rb +2 -2
- data/fixtures/lang-path-app/config.rb +2 -2
- data/fixtures/language-app/locales/en.yml +5 -4
- data/fixtures/language-app/locales/ru.yml +5 -4
- data/fixtures/language-app/source/2013-09-05-previous-english-article.html.erb +9 -0
- data/fixtures/language-app/source/2013-09-06-previous-russian-article.html.erb +9 -0
- data/fixtures/language-app/source/2013-09-07-english-article-with-lang-in-frontmatter.html.erb +5 -2
- data/fixtures/language-app/source/2013-09-07-russian-article-with-lang-in-frontmatter.html.erb +5 -2
- data/fixtures/language-app/source/2013-09-08-next-russian-article.html.erb +9 -0
- data/fixtures/language-app/source/2013-09-09-next-english-article.html.erb +9 -0
- data/fixtures/language-app/source/layouts/layout.erb +12 -1
- data/fixtures/language-app/source/localizable/index.html.erb +3 -1
- data/fixtures/layouts-app/config.rb +1 -1
- data/fixtures/layouts-app/source/2011/01/01/fourth-article.html.markdown +7 -0
- data/fixtures/paginate-app/config-directory-indexes.rb +5 -5
- data/fixtures/paginate-app/config-paginate-off.rb +6 -6
- data/fixtures/paginate-app/config.rb +6 -5
- data/fixtures/paginate-multiblog-app/config.rb +13 -13
- data/fixtures/permalink-app/config.rb +4 -0
- data/fixtures/permalink-app/source/index.html.erb +13 -0
- data/fixtures/permalink-app/source/layout.erb +26 -0
- data/fixtures/permalink-app/source/news/2011-01-01-new-article.html.markdown +9 -0
- data/fixtures/preview-app/config.rb +2 -2
- data/fixtures/published-app/config.rb +2 -2
- data/fixtures/summary-app/source/2013-05-08-article-with-custom-separator.html.markdown +1 -1
- data/fixtures/summary-app/source/2016-05-21-article-with-comment-separator.html.markdown +7 -0
- data/fixtures/tags-app/config-directory-indexes.rb +5 -4
- data/fixtures/tags-app/config-filters.rb +8 -0
- data/fixtures/tags-app/config-no-tags.rb +5 -3
- data/fixtures/tags-app/config.rb +5 -4
- data/fixtures/tags-app/source/blog/2011-01-03-no-taga.html.markdown +6 -0
- data/fixtures/tags-multiblog-app/config.rb +10 -10
- data/lib/middleman-blog/blog_article.rb +153 -50
- data/lib/middleman-blog/blog_data.rb +86 -39
- data/lib/middleman-blog/calendar_pages.rb +7 -13
- data/lib/middleman-blog/commands/article.rb +80 -31
- data/lib/middleman-blog/commands/article.tt +4 -1
- data/lib/middleman-blog/custom_pages.rb +7 -8
- data/lib/middleman-blog/extension.rb +7 -8
- data/lib/middleman-blog/helpers.rb +17 -26
- data/lib/middleman-blog/paginator.rb +7 -5
- data/lib/middleman-blog/tag_pages.rb +38 -13
- data/lib/middleman-blog/truncate_html.rb +10 -14
- data/lib/middleman-blog/uri_templates.rb +51 -23
- data/lib/middleman-blog/version.rb +1 -1
- data/lib/middleman-blog.rb +5 -4
- data/lib/middleman_extension.rb +1 -1
- data/middleman-blog.gemspec +20 -18
- data/spec/spec_helper.rb +0 -3
- data/spec/uri_templates_spec.rb +30 -22
- metadata +67 -50
- data/.gemtest +0 -0
- data/features/no_date.feature +0 -9
- data/features/permalink-data.feature +0 -12
- data/fixtures/blog-sources-app/source/_article_template.erb +0 -1
- data/fixtures/blog-sources-subdirs-app/source/blog/another-post.html.md.erb +0 -8
- data/fixtures/blog-sources-subdirs-app/source/blog/subdir/yet-another-post.html.md.erb +0 -8
- data/fixtures/no-date-app/config.rb +0 -3
- data/fixtures/no-date-app/source/_article_template.erb +0 -1
- data/fixtures/no-date-app/source/blog/new-article.html.markdown +0 -6
- data/fixtures/no-date-app/source/index.html.erb +0 -9
- data/fixtures/no-day-app/config.rb +0 -3
- data/fixtures/no-day-app/source/2012-08-testing.html.markdown +0 -6
- data/fixtures/no-day-app/source/layout.erb +0 -13
- data/fixtures/no-title-app/config.rb +0 -3
- data/fixtures/no-title-app/source/2013-08-07.html.markdown +0 -6
- data/fixtures/no-title-app/source/2013-08-08.html.markdown +0 -7
- data/fixtures/no-title-app/source/layout.erb +0 -13
- data/fixtures/permalink-data-app/config.rb +0 -5
- data/fixtures/permalink-data-app/source/index.html.erb +0 -3
- data/fixtures/permalink-data-app/source/layout.erb +0 -14
- data/fixtures/permalink-data-app/source/news/2011-01-01-new-article.html.markdown +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 02acc65e0b298f6a99ef12beb14728ce8b38a62d7bd4efb7f18c19c9a374bde0
|
|
4
|
+
data.tar.gz: 87d8c68a9f577326e49297d95e13cb38ec768b138c882debfab26caa0263eef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff9a0742dd98a22d3709c787977fbf23337b1fde7bebe42cd47ce7fd3f3ec9bef2dde7b2607775a660af381034fb5f82a4a220a74116c30428b976c008de610c
|
|
7
|
+
data.tar.gz: 68847383fc5fbce0753ac74ebf66b1f7988ea59a08ee7010a52fd19ea5fecd1e2723be23363d5300b098d6903df67cce1758b000d972d46f96c5c649b8337363
|
data/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
charset = utf-8
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
|
|
12
|
+
# editorconfig-tools is unable to ignore longs strings or urls
|
|
13
|
+
max_line_length = null
|
|
14
|
+
|
|
15
|
+
[*.md]
|
|
16
|
+
trim_trailing_whitespace = false
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
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
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
cache: bundler
|
|
3
|
+
|
|
1
4
|
rvm:
|
|
2
5
|
- ruby-head
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
- 2.
|
|
6
|
-
- 2.
|
|
7
|
-
|
|
6
|
+
- 2.6.0
|
|
7
|
+
- 2.5.3
|
|
8
|
+
- 2.4.5
|
|
9
|
+
- 2.3.8
|
|
10
|
+
|
|
8
11
|
os:
|
|
9
12
|
- linux
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
gemfile:
|
|
15
|
+
- Gemfile
|
|
16
|
+
- Gemfile-4.x
|
|
17
|
+
|
|
18
|
+
matrix :
|
|
13
19
|
fast_finish: true
|
|
14
20
|
allow_failures:
|
|
15
21
|
- rvm: ruby-head
|
|
16
|
-
- rvm: jruby-19mode
|
|
17
|
-
- rvm: jruby-head
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
- Gemfile
|
|
23
|
+
script: bundle exec rake test
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
env:
|
|
26
|
+
global:
|
|
27
|
+
- TEST=true
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
notifications:
|
|
30
|
+
email: false
|
data/.yardopts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
lib/**/*.rb
|
|
1
|
+
lib/**/*.rb
|
|
2
2
|
--no-private
|
|
3
|
-
--hide-void-return
|
|
3
|
+
--hide-void-return
|
data/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
* Loosen dependencies and test against Middlman v5 betas
|
|
6
|
+
* Adapt to core Rubocop standards
|
|
7
|
+
* Title should be always a string (#351)
|
|
8
|
+
* Fixed multibyte tags.
|
|
9
|
+
|
|
10
|
+
## 4.0.2
|
|
11
|
+
|
|
12
|
+
* Pushed Gem 2017-05-22
|
|
13
|
+
* Updated safe_parameterize - needs heavy testing from community
|
|
14
|
+
* Deprecating previous_article and next_article in favour of article_previous article_next
|
|
15
|
+
* Deprecating local_articles in favour of articles_by_locale
|
|
16
|
+
* Pull request #336 Add article_locale_next and article_locale_previous
|
|
17
|
+
* Pull request #312 Generating a blog article can optional create article subdirectory added manually
|
|
18
|
+
* Updated Gemfile for testing tools to remove the deprecation warnings from Aruba
|
|
19
|
+
* Added myself to GemSpec so I can push Gem live
|
|
20
|
+
* Edited Travis.yml to be inline with middleman core and the Ruby versions it tests against
|
|
21
|
+
* Created an GitHub Issue Template
|
|
22
|
+
* Created an Editor config
|
|
23
|
+
* Ruby 2.3.1 - middleman-core (master/4.2.1) - middleman-cli (master/4.2.1) - middleman-blog (local) - All tests pass
|
|
24
|
+
* Updated the Gemfile to use https to remove security warning - upped gem versions to match core
|
|
25
|
+
* Updated the license and readme
|
|
26
|
+
|
|
27
|
+
## 4.0.1
|
|
28
|
+
|
|
29
|
+
* Pull in article command from v3.5.3 tag
|
|
30
|
+
* Summary fix
|
|
31
|
+
* Add address parse cache
|
|
32
|
+
* Add filter option
|
|
33
|
+
* Make sure to not generate invalid html when creating article summary
|
|
34
|
+
* If a summary_generator is defined, always use it to generate summaries
|
|
35
|
+
* Fix issue #269: duplicated key
|
|
36
|
+
|
|
37
|
+
## 4.0.0.rc.1
|
|
3
38
|
|
|
4
39
|
* Removed `article` sub command.
|
|
5
40
|
|
|
6
|
-
3.5.3
|
|
7
|
-
===
|
|
41
|
+
## 3.5.3
|
|
8
42
|
|
|
9
43
|
* Update blog_article active_support requires. Fixes #205
|
|
10
44
|
|
|
11
|
-
3.5.2
|
|
12
|
-
===
|
|
45
|
+
## 3.5.2
|
|
13
46
|
|
|
14
47
|
* Ignored pages won't be processed by the blog extension.
|
|
15
48
|
* Avoid creating an empty-string collection when a post does not have a custom collection property set. #192
|
|
@@ -18,16 +51,14 @@
|
|
|
18
51
|
* An article's language can be set via the {lang} parameter in its sources URL template. #187
|
|
19
52
|
* Tags that are just a number work now. #188
|
|
20
53
|
|
|
21
|
-
3.5.1
|
|
22
|
-
===
|
|
54
|
+
## 3.5.1
|
|
23
55
|
|
|
24
56
|
* Remove a broken bracket in the blog template. #181
|
|
25
57
|
* Fix transliteration of strings into URL slugs to still transliterate when it can but not smash multibyte chars. #183
|
|
26
58
|
* Only match source URI templates if the date components match what a date would look like, and avoid throwing when companion files do not have an article. #184
|
|
27
59
|
* Re-support spaces in blog article source paths. #185
|
|
28
60
|
|
|
29
|
-
3.5.0
|
|
30
|
-
===
|
|
61
|
+
## 3.5.0
|
|
31
62
|
|
|
32
63
|
* Add support for internationalization and locale-specific articles. #156
|
|
33
64
|
* Drop support for Ruby 1.8 and Middleman 3.0.
|
|
@@ -40,13 +71,11 @@
|
|
|
40
71
|
* The template used to generate new articles via "middleman article" can be overridden by setting :new_article_template.
|
|
41
72
|
* Removed `:blog_name`, `:blog_author`, `:blog_avatar` options and the `page_title` helper.
|
|
42
73
|
|
|
43
|
-
3.4.1
|
|
44
|
-
====
|
|
74
|
+
## 3.4.1
|
|
45
75
|
|
|
46
76
|
* Require Middleman 3.2
|
|
47
77
|
|
|
48
|
-
3.4.0
|
|
49
|
-
====
|
|
78
|
+
## 3.4.0
|
|
50
79
|
|
|
51
80
|
* Add `inspect` methods to `BlogData` and `BlogArticle` to avoid hangs on exceptions. #157
|
|
52
81
|
* Generated feed.xml now works on blogs with no posts. #155
|
|
@@ -55,8 +84,7 @@
|
|
|
55
84
|
* Support for including arbitrary frontmatter data in blog permalinks. #164
|
|
56
85
|
* When using multiblog, fail immediately if the blog name isn't specified. #168
|
|
57
86
|
|
|
58
|
-
3.3.0
|
|
59
|
-
====
|
|
87
|
+
## 3.3.0
|
|
60
88
|
|
|
61
89
|
* Experimental support for multiple blogs in a single site by activating
|
|
62
90
|
`:blog` multiple times.
|
|
@@ -78,8 +106,7 @@
|
|
|
78
106
|
* Pages can choose which blog to use in multi-blog mode by specifying the correct
|
|
79
107
|
blog in frontmatter. #150
|
|
80
108
|
|
|
81
|
-
3.2.0
|
|
82
|
-
====
|
|
109
|
+
## 3.2.0
|
|
83
110
|
|
|
84
111
|
* The `summary` method on articles is now HTML-aware, and can be provided with
|
|
85
112
|
a different summary length or ellipsis string: `summary(1000, '…')`.
|
|
@@ -91,13 +118,13 @@
|
|
|
91
118
|
* The `summary_separator` option no longer needs to have a capturing group, or
|
|
92
119
|
even be a regexp.
|
|
93
120
|
|
|
94
|
-
3.1.1
|
|
95
|
-
|
|
121
|
+
## 3.1.1
|
|
122
|
+
|
|
96
123
|
* Correctly handle time zone, allow setting time zone with `set :time_zone`. #76
|
|
97
124
|
* Fix using `page_articles` in when `paginate` is false. #78
|
|
98
125
|
|
|
99
|
-
3.1.0
|
|
100
|
-
|
|
126
|
+
## 3.1.0
|
|
127
|
+
|
|
101
128
|
* Don't publish future-dated articles. #74
|
|
102
129
|
* Create summary from source instead of output. #70
|
|
103
130
|
* Deprecate instance variables in templates in favor of locals. #66
|
|
@@ -108,8 +135,8 @@
|
|
|
108
135
|
* Use `link_to` in blog templates. #62
|
|
109
136
|
* Pagination for index, tag, and calendar pages. #57
|
|
110
137
|
|
|
111
|
-
3.0.0
|
|
112
|
-
|
|
138
|
+
## 3.0.0
|
|
139
|
+
|
|
113
140
|
* Middleman-3.0 compatible release. Complete overhaul.
|
|
114
141
|
* Tag and calendar pages.
|
|
115
142
|
* Sitemap integration.
|
data/CONTRIBUTING.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Contributing
|
|
2
|
+
|
|
2
3
|
In the spirit of [free software][free-sw], **everyone** is encouraged to help
|
|
3
4
|
improve this project.
|
|
4
5
|
|
|
@@ -6,12 +7,12 @@ improve this project.
|
|
|
6
7
|
|
|
7
8
|
Here are some ways *you* can contribute:
|
|
8
9
|
|
|
9
|
-
* by using alpha, beta, and
|
|
10
|
+
* by using alpha, beta, and pre-release versions
|
|
10
11
|
* by reporting bugs
|
|
11
12
|
* by suggesting new features
|
|
12
13
|
* by writing or editing documentation
|
|
13
14
|
* by writing specifications
|
|
14
|
-
* by writing code ( **no patch is too small** : fix typos, add comments, clean up inconsistent
|
|
15
|
+
* by writing code ( **no patch is too small** : fix typos, add comments, clean up inconsistent white space )
|
|
15
16
|
* by refactoring code
|
|
16
17
|
* by closing [issues][]
|
|
17
18
|
* by reviewing patches
|
|
@@ -19,6 +20,7 @@ Here are some ways *you* can contribute:
|
|
|
19
20
|
[issues]: https://github.com/middleman/middleman-blog/issues
|
|
20
21
|
|
|
21
22
|
## Submitting an Issue
|
|
23
|
+
|
|
22
24
|
We use the [GitHub issue tracker][issues] to track bugs and features. Before
|
|
23
25
|
submitting a bug report or feature request, check to make sure it hasn't
|
|
24
26
|
already been submitted. When submitting a bug report, please include a [Gist][]
|
|
@@ -29,6 +31,7 @@ Ideally, a bug report should include a pull request with failing specs.
|
|
|
29
31
|
[gist]: https://gist.github.com/
|
|
30
32
|
|
|
31
33
|
## Submitting a Pull Request
|
|
34
|
+
|
|
32
35
|
1. [Fork the repository.][fork]
|
|
33
36
|
2. [Create a topic branch.][branch]
|
|
34
37
|
3. Add specs for your unimplemented feature or bug fix.
|
data/Gemfile
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
gem
|
|
3
|
+
# Middleman Gems
|
|
4
|
+
gem 'middleman-cli', git: 'https://github.com/middleman/middleman.git', branch: 'master'
|
|
5
|
+
gem 'middleman-core', git: 'https://github.com/middleman/middleman.git', branch: 'master'
|
|
5
6
|
|
|
6
7
|
# Specify your gem's dependencies in middleman-blog.gemspec
|
|
7
8
|
gemspec
|
|
8
9
|
|
|
9
10
|
# Build and doc tools
|
|
10
|
-
gem 'rake', '~>
|
|
11
|
-
gem 'yard', '~> 0.
|
|
11
|
+
gem 'rake', '~> 12.3', require: false
|
|
12
|
+
gem 'yard', '~> 0.9.11', require: false
|
|
12
13
|
|
|
13
14
|
# Test tools
|
|
14
|
-
gem '
|
|
15
|
-
gem '
|
|
15
|
+
gem 'aruba', '~> 0.14.0', require: false
|
|
16
|
+
gem 'byebug'
|
|
17
|
+
gem 'capybara', '~> 2.5.0', require: false
|
|
18
|
+
gem 'cucumber', '~> 3.0', require: false
|
|
16
19
|
gem 'rspec', '~> 3.0', require: false
|
|
17
|
-
gem 'cucumber', '~> 2.0', require: false
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
gem
|
|
21
|
-
gem
|
|
21
|
+
# Pry tools
|
|
22
|
+
gem 'pry'
|
|
23
|
+
gem 'pry-rescue'
|
|
24
|
+
gem 'pry-stack_explorer'
|
|
25
|
+
|
|
26
|
+
gem 'kramdown'
|
|
27
|
+
gem 'nokogiri', '~> 1.9.1'
|
|
28
|
+
gem 'timecop', '~> 0.6.3'
|
|
22
29
|
|
|
23
30
|
# Code Quality
|
|
24
|
-
gem 'rubocop', '~> 0.
|
|
25
|
-
gem 'simplecov', '~> 0.
|
|
26
|
-
gem 'coveralls', '~> 0.8', require: false
|
|
27
|
-
gem 'codeclimate-test-reporter', '~> 0.3', require: false, group: :test
|
|
31
|
+
gem 'rubocop', '~> 0.61.1', require: false
|
|
32
|
+
gem 'simplecov', '~> 0.10', require: false
|
|
28
33
|
|
|
34
|
+
# Set the ruby platform - not windows
|
|
29
35
|
platforms :ruby do
|
|
30
|
-
gem
|
|
36
|
+
gem 'redcarpet', '~> 3.1' # Latest 3.4.0
|
|
31
37
|
end
|
data/Gemfile-4.x
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
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
|
data/ISSUE_TEMPLATE.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## Expected behaviour
|
|
2
|
+
|
|
3
|
+
## Actual behaviour
|
|
4
|
+
|
|
5
|
+
## Steps to reproduce the problem
|
|
6
|
+
|
|
7
|
+
- Please provide a repository or some tests we can run through
|
|
8
|
+
|
|
9
|
+
## Additional information
|
|
10
|
+
|
|
11
|
+
- Ruby version:
|
|
12
|
+
- Middleman version:
|
|
13
|
+
- Middleman Blog version:
|
|
14
|
+
- OS version:
|
data/LICENSE.md
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
Copyright (c) 2010-
|
|
1
|
+
Copyright (c) 2010-2017 Thomas Reynolds
|
|
2
2
|
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
the following conditions:
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
10
9
|
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
13
12
|
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
# Middleman-Blog
|
|
1
|
+
# Middleman-Blog extension
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
middleman-blog is an extension for the [Middleman] static site generator that
|
|
4
|
+
adds blog-specific functionality. This includes :
|
|
5
|
+
|
|
6
|
+
- Handling blog articles
|
|
7
|
+
- Helpers for listing articles
|
|
8
|
+
- Tagging support
|
|
4
9
|
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
|
-
If you're just getting started, install the `middleman` gem and generate a new
|
|
12
|
+
If you're just getting started, install the `middleman` gem and generate a new
|
|
13
|
+
project:
|
|
8
14
|
|
|
9
15
|
```
|
|
10
16
|
gem install middleman
|
|
11
17
|
middleman init MY_PROJECT --template=blog
|
|
12
18
|
```
|
|
13
19
|
|
|
14
|
-
If you already have a Middleman project: Add `gem "middleman-blog"` to your
|
|
20
|
+
If you already have a Middleman project: Add `gem "middleman-blog"` to your
|
|
21
|
+
`Gemfile` and run `bundle install`
|
|
15
22
|
|
|
16
23
|
## Configuration
|
|
17
24
|
|
|
25
|
+
Within the config.rb of the middleman project, include the line
|
|
26
|
+
|
|
18
27
|
```
|
|
19
28
|
activate :blog
|
|
20
29
|
```
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
A more extensive guide can be found here :
|
|
32
|
+
[Middleman blogging guide](http://middlemanapp.com/basics/blogging/) it includes
|
|
33
|
+
more detailed information on configuring and using the blog extension.
|
|
25
34
|
|
|
26
35
|
Additionally, up-to-date generated code documentation is available on [RubyDoc].
|
|
27
36
|
|
|
@@ -29,39 +38,62 @@ Additionally, up-to-date generated code documentation is available on [RubyDoc].
|
|
|
29
38
|
|
|
30
39
|
[][gem]
|
|
31
40
|
[][travis]
|
|
32
|
-
|
|
33
|
-
[][codeclimate]
|
|
34
|
-
[][coveralls]
|
|
41
|
+
|
|
35
42
|
## Community
|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
Please also visit the the official [Middleman community forum](http://forum.middlemanapp.com)
|
|
38
45
|
|
|
39
46
|
## Bug Reports
|
|
40
47
|
|
|
41
|
-
Github Issues are used for managing bug reports and feature requests.
|
|
48
|
+
Github Issues are used for managing bug reports and feature requests.
|
|
49
|
+
|
|
50
|
+
If you run into issues or have an idea; please search and then submit the ticket
|
|
51
|
+
[here](https://github.com/middleman/middleman-blog/issues)
|
|
52
|
+
|
|
53
|
+
The best way to get quick responses to your issues and swift fixes to your bugs
|
|
54
|
+
is to submit detailed bug reports, include test cases and respond to developer
|
|
55
|
+
questions in a timely manner. Even better, if you know Ruby, you can submit
|
|
56
|
+
[Pull Requests](https://help.github.com/articles/using-pull-requests) containing
|
|
57
|
+
Cucumber Features which describe how your feature should work or exploit the bug
|
|
58
|
+
you are submitting.
|
|
59
|
+
|
|
60
|
+
## Testing
|
|
42
61
|
|
|
43
|
-
|
|
62
|
+
Our internal tests are passed through Travis, testing against the following
|
|
63
|
+
Ruby versions on Linux :
|
|
44
64
|
|
|
45
|
-
|
|
65
|
+
- ruby-head
|
|
66
|
+
- 2.4.0
|
|
67
|
+
- 2.3.1
|
|
68
|
+
- 2.2.4
|
|
69
|
+
|
|
70
|
+
### Running tests
|
|
46
71
|
|
|
47
72
|
1. Checkout Repository: `git clone https://github.com/middleman/middleman-blog.git`
|
|
48
73
|
2. Install Bundler: `gem install bundler`
|
|
49
74
|
3. Run `bundle install` inside the project root to install the gem dependencies.
|
|
50
75
|
4. Run test cases: `bundle exec rake test`
|
|
51
76
|
|
|
77
|
+
NB// To run an individual test use :
|
|
78
|
+
|
|
79
|
+
1. `bundle exec cucumber features/blog_sources.feature`
|
|
80
|
+
|
|
81
|
+
If you have suggestions for testing practices please submit a request.
|
|
82
|
+
|
|
83
|
+
## Creating documentation
|
|
84
|
+
|
|
85
|
+
1. `bundle exec rake doc`
|
|
86
|
+
|
|
52
87
|
## Donate
|
|
53
88
|
|
|
54
|
-
[Click here to lend your support to Middleman](https://
|
|
89
|
+
[Click here to lend your support to Middleman](https://plasso.com/s/4dXbHBorC3)
|
|
55
90
|
|
|
56
91
|
## License
|
|
57
92
|
|
|
58
|
-
Copyright (c) 2010-
|
|
93
|
+
Copyright (c) 2010-2017 Thomas Reynolds. MIT Licensed, see [LICENSE] for details.
|
|
59
94
|
|
|
60
95
|
[middleman]: http://middlemanapp.com
|
|
61
96
|
[gem]: https://rubygems.org/gems/middleman-blog
|
|
62
97
|
[travis]: http://travis-ci.org/middleman/middleman-blog
|
|
63
|
-
[
|
|
64
|
-
[codeclimate]: https://codeclimate.com/github/middleman/middleman-blog
|
|
65
|
-
[coveralls]: https://coveralls.io/r/middleman/middleman-blog
|
|
66
|
-
[rubydoc]: http://rubydoc.info/github/middleman/middleman-blog
|
|
98
|
+
[rubydoc]: http://rubydoc.info/github/middleman/middleman-blog/master
|
|
67
99
|
[LICENSE]: https://github.com/middleman/middleman-blog/blob/master/LICENSE.md
|
data/Rakefile
CHANGED
|
@@ -6,27 +6,32 @@ require 'cucumber/rake/task'
|
|
|
6
6
|
require 'middleman-core'
|
|
7
7
|
|
|
8
8
|
Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
|
|
9
|
-
ENV[
|
|
9
|
+
ENV['TEST'] = 'true'
|
|
10
10
|
|
|
11
|
-
exempt_tags =
|
|
12
|
-
exempt_tags <<
|
|
11
|
+
exempt_tags = ''
|
|
12
|
+
exempt_tags << '--tags ~@nojava ' if RUBY_PLATFORM == 'java'
|
|
13
13
|
|
|
14
14
|
t.cucumber_opts = "--color --tags ~@wip #{exempt_tags} --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
require 'rake/clean'
|
|
18
18
|
|
|
19
|
-
desc
|
|
20
|
-
task :
|
|
19
|
+
desc 'Run tests, both RSpec and Cucumber'
|
|
20
|
+
task test: %i[rubocop spec cucumber]
|
|
21
21
|
|
|
22
22
|
require 'rspec/core/rake_task'
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
desc 'Run RSpec'
|
|
24
25
|
RSpec::Core::RakeTask.new do |spec|
|
|
25
|
-
spec.pattern
|
|
26
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
|
26
27
|
spec.rspec_opts = ['--color', '--format documentation']
|
|
27
28
|
end
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
require 'rubocop/rake_task'
|
|
31
|
+
desc 'Run RuboCop to check code consistency'
|
|
32
|
+
RuboCop::RakeTask.new(:rubocop)
|
|
33
|
+
|
|
34
|
+
desc 'Build HTML documentation'
|
|
30
35
|
task :doc do
|
|
31
36
|
sh 'bundle exec yard'
|
|
32
37
|
end
|