jekyll 4.2.2 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +150 -26
  3. data/README.markdown +16 -19
  4. data/lib/jekyll/cache.rb +3 -7
  5. data/lib/jekyll/cleaner.rb +1 -1
  6. data/lib/jekyll/collection.rb +1 -0
  7. data/lib/jekyll/commands/build.rb +2 -13
  8. data/lib/jekyll/commands/clean.rb +1 -2
  9. data/lib/jekyll/commands/doctor.rb +13 -13
  10. data/lib/jekyll/commands/new.rb +5 -9
  11. data/lib/jekyll/commands/new_theme.rb +3 -4
  12. data/lib/jekyll/commands/serve/live_reload_reactor.rb +3 -6
  13. data/lib/jekyll/commands/serve/mime_types_charset.json +71 -0
  14. data/lib/jekyll/commands/serve/servlet.rb +13 -9
  15. data/lib/jekyll/commands/serve.rb +23 -18
  16. data/lib/jekyll/configuration.rb +2 -2
  17. data/lib/jekyll/converters/markdown/kramdown_parser.rb +13 -15
  18. data/lib/jekyll/data_entry.rb +83 -0
  19. data/lib/jekyll/data_hash.rb +61 -0
  20. data/lib/jekyll/deprecator.rb +1 -1
  21. data/lib/jekyll/document.rb +2 -3
  22. data/lib/jekyll/drops/document_drop.rb +1 -0
  23. data/lib/jekyll/drops/excerpt_drop.rb +4 -0
  24. data/lib/jekyll/drops/site_drop.rb +6 -1
  25. data/lib/jekyll/drops/theme_drop.rb +36 -0
  26. data/lib/jekyll/drops/unified_payload_drop.rb +6 -2
  27. data/lib/jekyll/entry_filter.rb +2 -6
  28. data/lib/jekyll/excerpt.rb +5 -6
  29. data/lib/jekyll/external.rb +17 -21
  30. data/lib/jekyll/filters.rb +11 -14
  31. data/lib/jekyll/frontmatter_defaults.rb +2 -4
  32. data/lib/jekyll/hooks.rb +2 -2
  33. data/lib/jekyll/layout.rb +8 -20
  34. data/lib/jekyll/mime.types +146 -73
  35. data/lib/jekyll/page.rb +2 -4
  36. data/lib/jekyll/path_manager.rb +7 -7
  37. data/lib/jekyll/plugin_manager.rb +12 -4
  38. data/lib/jekyll/profiler.rb +0 -3
  39. data/lib/jekyll/reader.rb +18 -1
  40. data/lib/jekyll/readers/data_reader.rb +51 -14
  41. data/lib/jekyll/renderer.rb +8 -10
  42. data/lib/jekyll/site.rb +52 -21
  43. data/lib/jekyll/static_file.rb +6 -9
  44. data/lib/jekyll/tags/highlight.rb +13 -9
  45. data/lib/jekyll/tags/include.rb +4 -4
  46. data/lib/jekyll/tags/post_url.rb +5 -5
  47. data/lib/jekyll/theme.rb +6 -2
  48. data/lib/jekyll/theme_builder.rb +1 -1
  49. data/lib/jekyll/url.rb +1 -1
  50. data/lib/jekyll/utils/ansi.rb +1 -1
  51. data/lib/jekyll/utils/win_tz.rb +18 -47
  52. data/lib/jekyll/utils.rb +18 -7
  53. data/lib/jekyll/version.rb +1 -1
  54. data/lib/jekyll.rb +3 -1
  55. data/lib/site_template/_config.yml +1 -1
  56. data/lib/theme_template/README.md.erb +1 -3
  57. metadata +61 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f122205829d592889ffa17acbd3356da8f0de5a0ea22eb5e81fe52ec5751c02
4
- data.tar.gz: fe9218747458a630880fa1b359141b07e34ad412f8ca0c4916b48060086c1814
3
+ metadata.gz: 96201c2ad5de2a82883b9efe695bfd44841b88be07a878479b6cda7bac0c2c9e
4
+ data.tar.gz: b23a9dcb412a6605a65aea79fbec04cff5f6e2d219c0009cf22a624a7514a19f
5
5
  SHA512:
6
- metadata.gz: ac4e6dff52be311677418ea2bf0e84d709fed2fb652f88aaf0fb42ec034702ea50f5f4b84876c79db6f0e801f0c9c3059ff011f10654f8274c39108c2b98ed25
7
- data.tar.gz: e570481ff2b899ba49c2cbd61a94f0ccd7ae9799f487251ca0eb72200edcf3df7e3aa528036fb873f842c0ca816ad640fb129a08a6cfedec7e4e7d9a40fa3151
6
+ metadata.gz: 457379d010c3e05bd5ee7472a38574ac5101af8740949738b221d8db369dcbae83d659591096876eff2878962a824d1f4abebd17f81be869889d4be2cb6e2d53
7
+ data.tar.gz: e2feb1925ca0ac86528b53c8e72f1f121b39deaaae92f21d777d10b8c2224e75ea6070553e276962b248d1a8d2a89812472d60d9502b110abf6268702ac2c3d7
data/.rubocop.yml CHANGED
@@ -2,7 +2,10 @@
2
2
  inherit_from: .rubocop_todo.yml
3
3
 
4
4
  require:
5
+ - rubocop-minitest
5
6
  - rubocop-performance
7
+ - rubocop-rake
8
+ - rubocop-rspec
6
9
  - ./rubocop/jekyll
7
10
 
8
11
  Jekyll/NoPutsAllowed:
@@ -10,8 +13,7 @@ Jekyll/NoPutsAllowed:
10
13
  - rake/*.rake
11
14
 
12
15
  AllCops:
13
- SuggestExtensions: false
14
- TargetRubyVersion: 2.4
16
+ TargetRubyVersion: 2.7
15
17
  Include:
16
18
  - lib/**/*.rb
17
19
  - test/**/*.rb
@@ -23,6 +25,11 @@ AllCops:
23
25
  - vendor/**/*
24
26
  - tmp/**/*
25
27
 
28
+ Gemspec/DeprecatedAttributeAssignment:
29
+ Enabled: true
30
+ Gemspec/RequireMFA:
31
+ Enabled: false
32
+
26
33
  Layout/BeginEndAlignment:
27
34
  Enabled: true
28
35
  Layout/EmptyComment:
@@ -31,14 +38,20 @@ Layout/EmptyLinesAroundAttributeAccessor:
31
38
  Enabled: true
32
39
  Layout/EndAlignment:
33
40
  Severity: error
34
- Layout/HashAlignment:
35
- EnforcedHashRocketStyle: table
36
- Layout/IndentationWidth:
37
- Severity: error
38
41
  Layout/FirstArrayElementIndentation:
39
42
  EnforcedStyle: consistent
40
43
  Layout/FirstHashElementIndentation:
41
44
  EnforcedStyle: consistent
45
+ Layout/HashAlignment:
46
+ EnforcedHashRocketStyle: table
47
+ Layout/IndentationWidth:
48
+ Severity: error
49
+ Layout/LineContinuationLeadingSpace:
50
+ Enabled: true
51
+ Layout/LineContinuationSpacing:
52
+ Enabled: true
53
+ Layout/LineEndStringConcatenationIndentation:
54
+ Enabled: true
42
55
  Layout/LineLength:
43
56
  Exclude:
44
57
  - !ruby/regexp /features\/.*.rb/
@@ -53,17 +66,29 @@ Layout/MultilineOperationIndentation:
53
66
  EnforcedStyle: indented
54
67
  Layout/SpaceAroundMethodCallOperator:
55
68
  Enabled: true
69
+ Layout/SpaceBeforeBrackets:
70
+ Enabled: true
56
71
  Layout/SpaceInsideHashLiteralBraces:
57
72
  Enabled: true
58
73
  Exclude:
59
74
  - test/**/*.rb
60
75
 
76
+ Lint/AmbiguousAssignment:
77
+ Enabled: true
78
+ Lint/AmbiguousOperatorPrecedence:
79
+ Enabled: true
80
+ Lint/AmbiguousRange:
81
+ Enabled: true
61
82
  Lint/BinaryOperatorWithIdenticalOperands:
62
83
  Enabled: true
63
84
  Lint/ConstantDefinitionInBlock:
64
85
  Enabled: true
65
86
  Exclude:
66
87
  - test/**/*.rb
88
+ Lint/ConstantOverwrittenInRescue:
89
+ Enabled: true
90
+ Lint/DeprecatedConstants:
91
+ Enabled: true
67
92
  Lint/DeprecatedOpenSSLConstant:
68
93
  Enabled: true
69
94
  Lint/DuplicateBranch:
@@ -72,10 +97,10 @@ Lint/DuplicateElsifCondition:
72
97
  Enabled: true
73
98
  Lint/DuplicateRegexpCharacterClassElement:
74
99
  Enabled: true
75
- Lint/DuplicateRescueException:
76
- Enabled: true
77
100
  Lint/DuplicateRequire:
78
101
  Enabled: true
102
+ Lint/DuplicateRescueException:
103
+ Enabled: true
79
104
  Lint/EmptyBlock:
80
105
  Enabled: true
81
106
  Lint/EmptyClass:
@@ -90,6 +115,8 @@ Lint/HashCompareByIdentity:
90
115
  Enabled: true
91
116
  Lint/IdentityComparison:
92
117
  Enabled: true
118
+ Lint/LambdaWithoutLiteralBlock:
119
+ Enabled: true
93
120
  Lint/MissingSuper:
94
121
  Enabled: false
95
122
  Lint/MixedRegexpCaptureTypes:
@@ -99,22 +126,38 @@ Lint/NestedPercentLiteral:
99
126
  - test/test_site.rb
100
127
  Lint/NoReturnInBeginEndBlocks:
101
128
  Enabled: true
129
+ Lint/NumberedParameterAssignment:
130
+ Enabled: true
131
+ Lint/OrAssignmentToConstant:
132
+ Enabled: true
102
133
  Lint/OutOfRangeRegexpRef:
103
134
  Enabled: true
104
135
  Lint/RaiseException:
105
136
  Enabled: true
137
+ Lint/RedundantDirGlobSort:
138
+ Enabled: true
106
139
  Lint/RedundantSafeNavigation:
107
140
  Enabled: true
141
+ Lint/RequireRangeParentheses:
142
+ Enabled: true
143
+ Lint/RequireRelativeSelfPath:
144
+ Enabled: true
108
145
  Lint/SelfAssignment:
109
146
  Enabled: true
110
147
  Lint/StructNewOverride:
111
148
  Enabled: true
149
+ Lint/SymbolConversion:
150
+ Enabled: true
112
151
  Lint/ToEnumArguments:
113
152
  Enabled: false
114
153
  Lint/TopLevelReturnWithArgument:
115
154
  Enabled: true
116
155
  Lint/TrailingCommaInAttributeDeclaration:
117
156
  Enabled: true
157
+ Lint/TripleQuotes:
158
+ Enabled: true
159
+ Lint/UnexpectedBlockArity:
160
+ Enabled: true
118
161
  Lint/UnmodifiedReduceAccumulator:
119
162
  Enabled: true
120
163
  Lint/UnreachableCode:
@@ -155,14 +198,47 @@ Metrics/MethodLength:
155
198
  Max: 20
156
199
  Severity: error
157
200
  Metrics/ModuleLength:
158
- Max: 240
159
201
  Exclude:
160
202
  - lib/jekyll/filters.rb
203
+ Max: 240
161
204
  Metrics/ParameterLists:
162
205
  Max: 4
163
206
  Metrics/PerceivedComplexity:
164
207
  Max: 13
165
208
 
209
+ Minitest/AssertEmptyLiteral:
210
+ Enabled: false
211
+ Minitest/AssertInDelta:
212
+ Enabled: true
213
+ Minitest/AssertionInLifecycleHook:
214
+ Enabled: true
215
+ Minitest/AssertKindOf:
216
+ Enabled: true
217
+ Minitest/AssertOutput:
218
+ Enabled: true
219
+ Minitest/AssertPathExists:
220
+ Enabled: true
221
+ Minitest/AssertSilent:
222
+ Enabled: true
223
+ Minitest/AssertWithExpectedArgument:
224
+ Enabled: true
225
+ Minitest/LiteralAsActualArgument:
226
+ Enabled: true
227
+ Minitest/TestMethodName:
228
+ Enabled: false
229
+ Minitest/MultipleAssertions:
230
+ Enabled: true
231
+ Minitest/RefuteInDelta:
232
+ Enabled: true
233
+ Minitest/RefuteKindOf:
234
+ Enabled: true
235
+ Minitest/RefutePathExists:
236
+ Enabled: true
237
+ Minitest/UnreachableAssertion:
238
+ Enabled: true
239
+ Minitest/UnspecifiedException:
240
+ Enabled: true
241
+
166
242
  Naming/FileName:
167
243
  Enabled: false
168
244
  Naming/HeredocDelimiterNaming:
@@ -189,10 +265,16 @@ Performance/CollectionLiteralInLoop:
189
265
  Enabled: true
190
266
  Performance/ConstantRegexp:
191
267
  Enabled: true
268
+ Performance/MapCompact:
269
+ Enabled: true
192
270
  Performance/MethodObjectAsBlock:
193
271
  Enabled: true
272
+ Performance/RedundantEqualityComparisonBlock:
273
+ Enabled: false
194
274
  Performance/RedundantSortBlock:
195
275
  Enabled: true
276
+ Performance/RedundantSplitRegexpArgument:
277
+ Enabled: true
196
278
  Performance/RedundantStringChars:
197
279
  Enabled: true
198
280
  Performance/ReverseFirst:
@@ -201,6 +283,8 @@ Performance/SortReverse:
201
283
  Enabled: false
202
284
  Performance/Squeeze:
203
285
  Enabled: true
286
+ Performance/StringIdentifierArgument:
287
+ Enabled: true
204
288
  Performance/StringInclude:
205
289
  Enabled: true
206
290
  Exclude:
@@ -208,6 +292,10 @@ Performance/StringInclude:
208
292
  Performance/Sum:
209
293
  Enabled: true
210
294
 
295
+ Security/CompoundHash:
296
+ Enabled: true
297
+ Security/IoMethods:
298
+ Enabled: true
211
299
  Security/MarshalLoad:
212
300
  Exclude:
213
301
  - !ruby/regexp /test\/.*.rb$/
@@ -217,22 +305,24 @@ Security/YAMLLoad:
217
305
  - !ruby/regexp /features\/.*.rb/
218
306
  - !ruby/regexp /test\/.*.rb$/
219
307
 
220
- Style/ArgumentsForwarding:
221
- Enabled: false
222
- Style/ArrayCoercion:
223
- Enabled: true
224
308
  Style/AccessModifierDeclarations:
225
309
  Enabled: false
226
310
  Style/AccessorGrouping:
227
- Enabled: false
311
+ Enabled: true
228
312
  Style/Alias:
229
313
  EnforcedStyle: prefer_alias_method
230
314
  Style/AndOr:
231
315
  Severity: error
316
+ Style/ArgumentsForwarding:
317
+ Enabled: false
318
+ Style/ArrayCoercion:
319
+ Enabled: true
232
320
  Style/BisectedAttrAccessor:
233
321
  Enabled: true
234
322
  Style/CaseLikeIf:
235
323
  Enabled: true
324
+ Style/StringChars:
325
+ Enabled: true
236
326
  Style/ClassAndModuleChildren:
237
327
  Exclude:
238
328
  - test/**/*.rb
@@ -242,16 +332,26 @@ Style/CollectionCompact:
242
332
  Enabled: true
243
333
  Style/CombinableLoops:
244
334
  Enabled: true
245
- Style/Documentation:
246
- Enabled: false
247
335
  Style/DocumentDynamicEvalDefinition:
248
336
  Enabled: true
337
+ Style/Documentation:
338
+ Enabled: false
249
339
  Style/DoubleNegation:
250
340
  Enabled: false
251
- Style/ExponentialNotation:
341
+ Style/EmptyHeredoc:
342
+ Enabled: true
343
+ Style/EndlessMethod:
252
344
  Enabled: true
253
345
  Style/ExplicitBlockArgument:
254
346
  Enabled: false
347
+ Style/ExponentialNotation:
348
+ Enabled: true
349
+ Style/EnvHome:
350
+ Enabled: true
351
+ Style/FetchEnvVar:
352
+ Enabled: false
353
+ Style/FileRead:
354
+ Enabled: false
255
355
  Style/FormatStringToken:
256
356
  Exclude:
257
357
  - lib/jekyll/utils/ansi.rb
@@ -259,14 +359,20 @@ Style/FormatStringToken:
259
359
  - lib/jekyll/profiler.rb
260
360
  Style/FrozenStringLiteralComment:
261
361
  EnforcedStyle: always
362
+ Style/FileWrite:
363
+ Enabled: true
262
364
  Style/GlobalStdStream:
263
365
  Enabled: true
264
366
  Style/GuardClause:
265
367
  Enabled: false
266
368
  Style/HashAsLastArrayItem:
267
369
  Enabled: true
370
+ Style/HashConversion:
371
+ Enabled: true
268
372
  Style/HashEachMethods:
269
373
  Enabled: true
374
+ Style/HashExcept:
375
+ Enabled: true
270
376
  Style/HashLikeCase:
271
377
  Enabled: true
272
378
  Style/HashSyntax:
@@ -276,8 +382,16 @@ Style/HashTransformKeys:
276
382
  Enabled: false
277
383
  Style/HashTransformValues:
278
384
  Enabled: true
385
+ Style/IfWithBooleanLiteralBranches:
386
+ Enabled: true
279
387
  Style/KeywordParametersOrder:
280
388
  Enabled: true
389
+ Style/MagicCommentFormat:
390
+ Enabled: true
391
+ Style/MapCompactWithConditionalBlock:
392
+ Enabled: true
393
+ Style/MapToHash:
394
+ Enabled: true
281
395
  Style/MixinUsage:
282
396
  Exclude:
283
397
  - test/helper.rb
@@ -287,35 +401,45 @@ Style/MultilineTernaryOperator:
287
401
  Severity: error
288
402
  Style/NegatedIfElseCondition:
289
403
  Enabled: true
404
+ Style/NestedFileDirname:
405
+ Enabled: true
290
406
  Style/NilLambda:
291
407
  Enabled: true
292
408
  Style/OptionalBooleanParameter:
293
409
  Enabled: true
410
+ Exclude:
411
+ - lib/jekyll/log_adapter.rb
294
412
  Style/PercentLiteralDelimiters:
295
413
  PreferredDelimiters:
296
- "%q": "{}"
297
414
  "%Q": "{}"
415
+ "%W": ()
416
+ "%q": "{}"
298
417
  "%r": "!!"
299
- "%s": "()"
300
- "%w": "()"
301
- "%W": "()"
302
- "%x": "()"
418
+ "%s": ()
419
+ "%w": ()
420
+ "%x": ()
421
+ Style/QuotedSymbols:
422
+ Enabled: true
303
423
  Style/RedundantArgument:
304
424
  Enabled: true
305
425
  Style/RedundantAssignment:
306
426
  Enabled: true
307
- Style/RedundantBegin:
308
- Enabled: false
309
427
  Style/RedundantFetchBlock:
310
428
  Enabled: false
311
429
  Style/RedundantFileExtensionInRequire:
312
430
  Enabled: true
431
+ Style/RedundantInitialize:
432
+ Enabled: true
433
+ Exclude:
434
+ - lib/jekyll/plugin.rb
313
435
  Style/RedundantRegexpCharacterClass:
314
436
  Enabled: true
315
437
  Style/RedundantRegexpEscape:
316
438
  Enabled: true
317
439
  Style/RedundantSelfAssignment:
318
440
  Enabled: true
441
+ Style/RedundantSelfAssignmentBranch:
442
+ Enabled: true
319
443
  Style/RegexpLiteral:
320
444
  EnforcedStyle: percent_r
321
445
  Style/RescueModifier:
@@ -331,13 +455,13 @@ Style/SlicingWithRange:
331
455
  Enabled: false
332
456
  Style/SoleNestedConditional:
333
457
  Enabled: true
334
- Style/StringLiterals:
335
- EnforcedStyle: double_quotes
336
458
  Style/StringConcatenation:
337
459
  Enabled: true
338
460
  Exclude:
339
461
  - lib/jekyll/commands/*.rb
340
462
  - test/**/*.rb
463
+ Style/StringLiterals:
464
+ EnforcedStyle: double_quotes
341
465
  Style/StringLiteralsInInterpolation:
342
466
  EnforcedStyle: double_quotes
343
467
  Style/SwapValues:
data/README.markdown CHANGED
@@ -3,12 +3,10 @@
3
3
  [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
4
4
  [![Linux Build Status](https://github.com/jekyll/jekyll/workflows/Continuous%20Integration/badge.svg)][ci-workflow]
5
5
  [![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
6
- [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
7
6
  [![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
8
7
  [![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
9
8
 
10
9
  [ruby-gems]: https://rubygems.org/gems/jekyll
11
- [hakiri]: https://hakiri.io/github/jekyll/jekyll/master
12
10
  [ci-workflow]: https://github.com/jekyll/jekyll/actions?query=workflow%3A%22Continuous+Integration%22+branch%3Amaster
13
11
  [appveyor]: https://ci.appveyor.com/project/jekyll/jekyll/branch/master
14
12
 
@@ -18,7 +16,7 @@ Jekyll is a simple, blog-aware, static site generator perfect for personal, proj
18
16
 
19
17
  Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
20
18
 
21
- See: https://jekyllrb.com/philosophy
19
+ See: [https://jekyllrb.com/philosophy](https://jekyllrb.com/philosophy)
22
20
 
23
21
  ## Getting Started
24
22
 
@@ -26,11 +24,11 @@ See: https://jekyllrb.com/philosophy
26
24
  * Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
27
25
  * Take a gander at some existing [Sites](https://github.com/jekyll/jekyll/wiki/sites)
28
26
  * [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
29
- * Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
27
+ * Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) and [`#jekyll` Channel on Libera IRC](https://libera.chat)
30
28
 
31
29
  ## Diving In
32
30
 
33
- * [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
31
+ * [Migrate](https://import.jekyllrb.com/docs/home/) from your previous system
34
32
  * Learn how [Front Matter](https://jekyllrb.com/docs/front-matter/) works
35
33
  * Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
36
34
  * Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
@@ -45,7 +43,7 @@ If you don't find the answer to your problem in our [docs](https://jekyllrb.com/
45
43
  ## Code of Conduct
46
44
 
47
45
  In order to have a more open and welcoming community, Jekyll adheres to a
48
- [code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
46
+ [code of conduct](https://jekyllrb.com/docs/conduct/) adapted from the Ruby on Rails code of
49
47
  conduct.
50
48
 
51
49
  Please adhere to this code of conduct in any interactions you have in the
@@ -58,28 +56,27 @@ these terms, please let one of our [core team members](https://jekyllrb.com/team
58
56
  ### Sponsors
59
57
 
60
58
  Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
61
-
62
- <a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
63
- <a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
64
- <a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
65
- <a href="https://opencollective.com/jekyll/sponsor/3/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/3/avatar.svg" /></a>
66
- <a href="https://opencollective.com/jekyll/sponsor/4/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/4/avatar.svg" /></a>
67
- <a href="https://opencollective.com/jekyll/sponsor/5/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/5/avatar.svg" /></a>
68
- <a href="https://opencollective.com/jekyll/sponsor/6/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/6/avatar.svg" /></a>
69
- <a href="https://opencollective.com/jekyll/sponsor/7/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/7/avatar.svg" /></a>
70
- <a href="https://opencollective.com/jekyll/sponsor/8/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/8/avatar.svg" /></a>
71
- <a href="https://opencollective.com/jekyll/sponsor/9/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/9/avatar.svg" /></a>
59
+ [![Jekyll Sponsor 0](https://opencollective.com/jekyll/sponsor/0/avatar.svg)](https://opencollective.com/jekyll/sponsor/0/website)
60
+ [![Jekyll Sponsor 1](https://opencollective.com/jekyll/sponsor/1/avatar.svg)](https://opencollective.com/jekyll/sponsor/1/website)
61
+ [![Jekyll Sponsor 2](https://opencollective.com/jekyll/sponsor/2/avatar.svg)](https://opencollective.com/jekyll/sponsor/2/website)
62
+ [![Jekyll Sponsor 3](https://opencollective.com/jekyll/sponsor/3/avatar.svg)](https://opencollective.com/jekyll/sponsor/3/website)
63
+ [![Jekyll Sponsor 4](https://opencollective.com/jekyll/sponsor/4/avatar.svg)](https://opencollective.com/jekyll/sponsor/4/website)
64
+ [![Jekyll Sponsor 5](https://opencollective.com/jekyll/sponsor/5/avatar.svg)](https://opencollective.com/jekyll/sponsor/5/website)
65
+ [![Jekyll Sponsor 6](https://opencollective.com/jekyll/sponsor/6/avatar.svg)](https://opencollective.com/jekyll/sponsor/6/website)
66
+ [![Jekyll Sponsor 7](https://opencollective.com/jekyll/sponsor/7/avatar.svg)](https://opencollective.com/jekyll/sponsor/7/website)
67
+ [![Jekyll Sponsor 8](https://opencollective.com/jekyll/sponsor/8/avatar.svg)](https://opencollective.com/jekyll/sponsor/8/website)
68
+ [![Jekyll Sponsor 9](https://opencollective.com/jekyll/sponsor/9/avatar.svg)](https://opencollective.com/jekyll/sponsor/9/website)
72
69
 
73
70
  ### Contributors
74
71
 
75
72
  This project exists thanks to all the people who contribute.
76
- <a href="../../graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
73
+ [![Jekyll Contributors](https://opencollective.com/jekyll/contributors.svg?width=890&button=false)](../../graphs/contributors)
77
74
 
78
75
  ### Backers
79
76
 
80
77
  Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
81
78
 
82
- <a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
79
+ [![Jekyll Backers](https://opencollective.com/jekyll/backers.svg?width=890)](https://opencollective.com/jekyll#backers)
83
80
 
84
81
  ## License
85
82
 
data/lib/jekyll/cache.rb CHANGED
@@ -11,14 +11,10 @@ module Jekyll
11
11
  @disk_cache_enabled = true
12
12
 
13
13
  class << self
14
- # class-wide cache location
15
- attr_accessor :cache_dir
14
+ attr_accessor :cache_dir # class-wide cache location
16
15
 
17
- # class-wide directive to write cache to disk
18
- attr_reader :disk_cache_enabled
19
-
20
- # class-wide base cache reader
21
- attr_reader :base_cache
16
+ attr_reader :base_cache, # class-wide base cache reader
17
+ :disk_cache_enabled # class-wide directive to write cache to disk
22
18
 
23
19
  # Disable Marshaling cached items to disk
24
20
  def disable_disk_cache!
@@ -29,7 +29,7 @@ module Jekyll
29
29
 
30
30
  # Private: The metadata file storing dependency tree and build history
31
31
  #
32
- # Returns an Array with the metdata file as the only item
32
+ # Returns an Array with the metadata file as the only item
33
33
  def metadata_file
34
34
  [site.regenerator.metadata_file]
35
35
  end
@@ -65,6 +65,7 @@ module Jekyll
65
65
  read_static_file(file_path, full_path)
66
66
  end
67
67
  end
68
+ site.static_files.concat(files) unless files.empty?
68
69
  sort_docs!
69
70
  end
70
71
 
@@ -30,8 +30,8 @@ module Jekyll
30
30
  site = Jekyll::Site.new(options)
31
31
 
32
32
  if options.fetch("skip_initial_build", false)
33
- Jekyll.logger.warn "Build Warning:", "Skipping the initial build." \
34
- " This may result in an out-of-date site."
33
+ Jekyll.logger.warn "Build Warning:",
34
+ "Skipping the initial build. This may result in an out-of-date site."
35
35
  else
36
36
  build(site, options)
37
37
  end
@@ -73,17 +73,6 @@ module Jekyll
73
73
  #
74
74
  # Returns nothing.
75
75
  def watch(site, options)
76
- # Warn Windows users that they might need to upgrade.
77
- if Utils::Platforms.bash_on_windows?
78
- Jekyll.logger.warn "",
79
- "Auto-regeneration may not work on some Windows versions."
80
- Jekyll.logger.warn "",
81
- "Please see: https://github.com/Microsoft/BashOnWindows/issues/216"
82
- Jekyll.logger.warn "",
83
- "If it does not work, please upgrade Bash on Windows or "\
84
- "run Jekyll with --no-watch."
85
- end
86
-
87
76
  External.require_with_graceful_fail "jekyll-watch"
88
77
  Jekyll::Watcher.watch(options, site)
89
78
  end
@@ -7,8 +7,7 @@ module Jekyll
7
7
  def init_with_program(prog)
8
8
  prog.command(:clean) do |c|
9
9
  c.syntax "clean [subcommand]"
10
- c.description "Clean the site " \
11
- "(removes site output and metadata file) without building."
10
+ c.description "Clean the site (removes site output and metadata file) without building."
12
11
 
13
12
  add_build_options(c)
14
13
 
@@ -53,14 +53,14 @@ module Jekyll
53
53
  "Detected '_posts' directory outside custom `collections_dir`!"
54
54
  Jekyll.logger.warn "",
55
55
  "Please move '#{posts_at_root}' into the custom directory at " \
56
- "'#{site.in_source_dir(site.config["collections_dir"])}'"
56
+ "'#{site.in_source_dir(site.config["collections_dir"])}'"
57
57
  false
58
58
  end
59
59
 
60
60
  def deprecated_relative_permalinks(site)
61
61
  if site.config["relative_permalinks"]
62
- Jekyll::Deprecator.deprecation_message "Your site still uses relative permalinks," \
63
- " which was removed in Jekyll v3.0.0."
62
+ Jekyll::Deprecator.deprecation_message "Your site still uses relative permalinks, " \
63
+ "which was removed in Jekyll v3.0.0."
64
64
  true
65
65
  end
66
66
  end
@@ -105,9 +105,9 @@ module Jekyll
105
105
  next unless real_urls.uniq.size > 1
106
106
 
107
107
  urls_only_differ_by_case = true
108
- Jekyll.logger.warn "Warning:", "The following URLs only differ" \
109
- " by case. On a case-insensitive file system one of the URLs" \
110
- " will be overwritten by the other: #{real_urls.join(", ")}"
108
+ Jekyll.logger.warn "Warning:", "The following URLs only differ by case. On a " \
109
+ "case-insensitive file system one of the URLs will be " \
110
+ "overwritten by the other: #{real_urls.join(", ")}"
111
111
  end
112
112
  urls_only_differ_by_case
113
113
  end
@@ -148,8 +148,8 @@ module Jekyll
148
148
  def url_exists?(url)
149
149
  return true unless url.nil? || url.empty?
150
150
 
151
- Jekyll.logger.warn "Warning:", "You didn't set an URL in the config file, "\
152
- "you may encounter problems with some plugins."
151
+ Jekyll.logger.warn "Warning:", "You didn't set an URL in the config file, you may " \
152
+ "encounter problems with some plugins."
153
153
  false
154
154
  end
155
155
 
@@ -157,18 +157,18 @@ module Jekyll
157
157
  Addressable::URI.parse(url)
158
158
  true
159
159
  # Addressable::URI#parse only raises a TypeError
160
- # https://git.io/vFfbx
160
+ # https://github.com/sporkmonger/addressable/blob/0a0e96acb17225f9b1c9cab0bad332b448934c9a/lib/addressable/uri.rb#L103
161
161
  rescue TypeError
162
- Jekyll.logger.warn "Warning:", "The site URL does not seem to be valid, "\
163
- "check the value of `url` in your config file."
162
+ Jekyll.logger.warn "Warning:", "The site URL does not seem to be valid, " \
163
+ "check the value of `url` in your config file."
164
164
  false
165
165
  end
166
166
 
167
167
  def url_absolute(url)
168
168
  return true if url.is_a?(String) && Addressable::URI.parse(url).absolute?
169
169
 
170
- Jekyll.logger.warn "Warning:", "Your site URL does not seem to be absolute, "\
171
- "check the value of `url` in your config file."
170
+ Jekyll.logger.warn "Warning:", "Your site URL does not seem to be absolute, " \
171
+ "check the value of `url` in your config file."
172
172
  false
173
173
  end
174
174
  end
@@ -28,8 +28,8 @@ module Jekyll
28
28
  FileUtils.mkdir_p new_blog_path
29
29
  if preserve_source_location?(new_blog_path, options)
30
30
  Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
31
- Jekyll.logger.abort_with "", "Ensure #{new_blog_path} is empty or else " \
32
- "try again with `--force` to proceed and overwrite any files."
31
+ Jekyll.logger.abort_with "", "Ensure #{new_blog_path} is empty or else try again " \
32
+ "with `--force` to proceed and overwrite any files."
33
33
  end
34
34
 
35
35
  if options["blank"]
@@ -92,7 +92,7 @@ module Jekyll
92
92
  # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
93
93
  # and associated library.
94
94
  platforms :mingw, :x64_mingw, :mswin, :jruby do
95
- gem "tzinfo", "~> 1.2"
95
+ gem "tzinfo", ">= 1", "< 3"
96
96
  gem "tzinfo-data"
97
97
  end
98
98
 
@@ -108,13 +108,9 @@ module Jekyll
108
108
  def create_site(new_blog_path)
109
109
  create_sample_files new_blog_path
110
110
 
111
- File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
112
- f.write(scaffold_post_content)
113
- end
111
+ File.write(File.expand_path(initialized_post_name, new_blog_path), scaffold_post_content)
114
112
 
115
- File.open(File.expand_path("Gemfile", new_blog_path), "w") do |f|
116
- f.write(gemfile_contents)
117
- end
113
+ File.write(File.expand_path("Gemfile", new_blog_path), gemfile_contents)
118
114
  end
119
115
 
120
116
  def preserve_source_location?(path, options)