mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Compare commits
416 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
177c1ca09e | ||
|
|
07c5ddde4a | ||
|
|
4081044178 | ||
|
|
139073430f | ||
|
|
575bf51fa2 | ||
|
|
4814b45847 | ||
|
|
81392ae0ee | ||
|
|
9136e9c394 | ||
|
|
62a65cd358 | ||
|
|
3e077bba84 | ||
|
|
2b33b3df23 | ||
|
|
f7d5559f10 | ||
|
|
4d6edb3a26 | ||
|
|
fb7a13ab1e | ||
|
|
87cc350313 | ||
|
|
85be75160c | ||
|
|
0ff2ef7d28 | ||
|
|
aaa723373b | ||
|
|
ce6173360d | ||
|
|
b4b90a989c | ||
|
|
edbd9f3028 | ||
|
|
2eb0c5bc8d | ||
|
|
e51f9c346c | ||
|
|
f0da10a77a | ||
|
|
51629865de | ||
|
|
6e980f3f6a | ||
|
|
37c9347422 | ||
|
|
0001895968 | ||
|
|
d0f8c86d2f | ||
|
|
493757d7cf | ||
|
|
66ac9b8675 | ||
|
|
ef41eeb7d4 | ||
|
|
fe0a6caa7f | ||
|
|
5701087e7b | ||
|
|
e9f78247de | ||
|
|
02a2f9460a | ||
|
|
e61cc513e9 | ||
|
|
477dbb34f4 | ||
|
|
f0e26e9c1a | ||
|
|
9f05275619 | ||
|
|
89ac354d5a | ||
|
|
f034f624cc | ||
|
|
c58d747506 | ||
|
|
5c41eb743f | ||
|
|
ad9fbeb4b1 | ||
|
|
50e0379444 | ||
|
|
c2649ce5fb | ||
|
|
4cfba70355 | ||
|
|
6802ec93eb | ||
|
|
707e48a412 | ||
|
|
ca2766c2a1 | ||
|
|
cf9176efba | ||
|
|
8256ff1757 | ||
|
|
af78a1a568 | ||
|
|
34a1b7aeef | ||
|
|
b2c6d03b47 | ||
|
|
e49f507e4f | ||
|
|
506c764e1e | ||
|
|
16e9820dac | ||
|
|
c7ce7ae054 | ||
|
|
3be9e74942 | ||
|
|
7a4b3fe03d | ||
|
|
b69196cad3 | ||
|
|
f9ada3ced6 | ||
|
|
e10444abf7 | ||
|
|
9adac3a11e | ||
|
|
0612542582 | ||
|
|
5d1f85928a | ||
|
|
dcbc443387 | ||
|
|
1801793035 | ||
|
|
0e0960e2c3 | ||
|
|
402ee84abb | ||
|
|
5950a7c113 | ||
|
|
8846741ed2 | ||
|
|
a1ea95d445 | ||
|
|
3650baa5db | ||
|
|
4c7dbb6915 | ||
|
|
c124937e69 | ||
|
|
f4fcfbdaa0 | ||
|
|
caa0846e7b | ||
|
|
d57715031a | ||
|
|
565567ac08 | ||
|
|
385bf36724 | ||
|
|
70f4d4908d | ||
|
|
bfd58fa949 | ||
|
|
43f4fc6c70 | ||
|
|
4d96e4b7bd | ||
|
|
e418d9b2f4 | ||
|
|
2dcdc49a36 | ||
|
|
efb7819d2e | ||
|
|
67331185c2 | ||
|
|
caae9d2eca | ||
|
|
cb84017bbe | ||
|
|
0728ccf08b | ||
|
|
0b6962cfe9 | ||
|
|
3204445d6f | ||
|
|
76422b03b7 | ||
|
|
76919eea3b | ||
|
|
1d461224dd | ||
|
|
8b63fbed6b | ||
|
|
f0cbbbb304 | ||
|
|
55ea4c840b | ||
|
|
bbc9c99cf9 | ||
|
|
6dbf8f469c | ||
|
|
cd996387a5 | ||
|
|
baf70295f9 | ||
|
|
10b23f7466 | ||
|
|
e47dad9d20 | ||
|
|
4baa0093ed | ||
|
|
d7cef0c6db | ||
|
|
4c2c33aefd | ||
|
|
48e2de862d | ||
|
|
5687a09255 | ||
|
|
c6415ce081 | ||
|
|
0e360623cb | ||
|
|
035ea729ff | ||
|
|
6c771608e5 | ||
|
|
6805f1c342 | ||
|
|
1684905ec7 | ||
|
|
d64493806c | ||
|
|
e3b325931b | ||
|
|
a96f846bdb | ||
|
|
97c28f5495 | ||
|
|
03c252ba4d | ||
|
|
6792ff936c | ||
|
|
e932a1e27f | ||
|
|
9aec161550 | ||
|
|
9968df06b3 | ||
|
|
bc84603017 | ||
|
|
d22b8ee392 | ||
|
|
784f2e2c0d | ||
|
|
b89efa5d5d | ||
|
|
450da91b4b | ||
|
|
b18872b658 | ||
|
|
74581422e3 | ||
|
|
aed72f6464 | ||
|
|
b915c7577b | ||
|
|
3bf940b7ee | ||
|
|
fbaf591c12 | ||
|
|
007af750f4 | ||
|
|
62d297d4a0 | ||
|
|
df0a5f7b0b | ||
|
|
8bb98632b4 | ||
|
|
5a41149b7b | ||
|
|
4f06767ac8 | ||
|
|
c6000597d9 | ||
|
|
b63036989a | ||
|
|
9343d2e6bb | ||
|
|
5d1823b604 | ||
|
|
149d5de59a | ||
|
|
c2211eec0c | ||
|
|
0b196ebd00 | ||
|
|
56593bf897 | ||
|
|
e9b507a0df | ||
|
|
a59eaff789 | ||
|
|
e2d8d3b92f | ||
|
|
66f8e748fe | ||
|
|
0c5b74377b | ||
|
|
cec17d03f8 | ||
|
|
9e76d2b496 | ||
|
|
192df096b0 | ||
|
|
694800270a | ||
|
|
7612056bed | ||
|
|
e0758ba550 | ||
|
|
41fa9cda36 | ||
|
|
be25b47486 | ||
|
|
f8dfbd2f7b | ||
|
|
acdbf81476 | ||
|
|
7e1afd32a5 | ||
|
|
1eff0214d1 | ||
|
|
bb1889afe4 | ||
|
|
3eb73f2795 | ||
|
|
b95151c4a7 | ||
|
|
c0ae27f068 | ||
|
|
64677e7c36 | ||
|
|
3899bf52f8 | ||
|
|
15f1ed8c4f | ||
|
|
b6201db17f | ||
|
|
ed9e72db9e | ||
|
|
a499018dc8 | ||
|
|
c08b882717 | ||
|
|
b0a1c42222 | ||
|
|
3ed4dbd227 | ||
|
|
da6c4c488a | ||
|
|
a80442ee87 | ||
|
|
9b8f9bba4e | ||
|
|
9ad78ebdeb | ||
|
|
4a45407558 | ||
|
|
305342ffa4 | ||
|
|
b22e281bc5 | ||
|
|
5b37555835 | ||
|
|
95a103b882 | ||
|
|
12fa319ee4 | ||
|
|
9461c900c0 | ||
|
|
43de0b694f | ||
|
|
e00c8c72e9 | ||
|
|
3e8196fc7e | ||
|
|
a89bba3712 | ||
|
|
eea203c77e | ||
|
|
8c8e2db0e5 | ||
|
|
ebce53dd08 | ||
|
|
34b710e133 | ||
|
|
f686b244cf | ||
|
|
739411ff3b | ||
|
|
c8eb0c1950 | ||
|
|
27ca1282fa | ||
|
|
b22915fe22 | ||
|
|
cf6d60b145 | ||
|
|
c60dd66db5 | ||
|
|
c2851766c5 | ||
|
|
c27533c75d | ||
|
|
f81f1e8e1b | ||
|
|
99da7cd940 | ||
|
|
3e32d12c45 | ||
|
|
3af8553c7c | ||
|
|
7f9ac93e4f | ||
|
|
4dd00fd354 | ||
|
|
3ee71c048c | ||
|
|
77fe78eaf7 | ||
|
|
0dede77a4a | ||
|
|
f9f5d5fa57 | ||
|
|
d5c2ebe610 | ||
|
|
f691121d2b | ||
|
|
29787c7eb7 | ||
|
|
83d950a4b7 | ||
|
|
5966e84313 | ||
|
|
66a8a03124 | ||
|
|
40d6ebd85e | ||
|
|
d0b907c2e6 | ||
|
|
a7b1cbe3f8 | ||
|
|
bea275e4c5 | ||
|
|
8941265837 | ||
|
|
24df53be20 | ||
|
|
3a5cd964af | ||
|
|
cd513da07e | ||
|
|
822d020086 | ||
|
|
7a6d0ccca3 | ||
|
|
d14f9aba99 | ||
|
|
4d26d30b6c | ||
|
|
7e72cbddd2 | ||
|
|
6fc2cfea6e | ||
|
|
3f98a743ed | ||
|
|
2a86c00011 | ||
|
|
7dc4d4fd67 | ||
|
|
551037c37b | ||
|
|
ba52e9e7c1 | ||
|
|
5096e8a9ac | ||
|
|
c9346ef522 | ||
|
|
8f78afe92b | ||
|
|
5da2b316eb | ||
|
|
449a874bf7 | ||
|
|
d09db32d10 | ||
|
|
d1aa1cfd5b | ||
|
|
971815cd5c | ||
|
|
5ba6a36b1f | ||
|
|
053b522a82 | ||
|
|
beada92da8 | ||
|
|
29dc190fcb | ||
|
|
bfdd26fdcc | ||
|
|
651b9b5593 | ||
|
|
8fab142750 | ||
|
|
3cbfc48e63 | ||
|
|
2765f0fcb9 | ||
|
|
36fbcaa863 | ||
|
|
ef027be97e | ||
|
|
748051fbc6 | ||
|
|
a27d8faa34 | ||
|
|
d97b3412bc | ||
|
|
925fb6da45 | ||
|
|
2a032a38ec | ||
|
|
7c12ebb28a | ||
|
|
ba94e87978 | ||
|
|
b6e3e739d9 | ||
|
|
37b729fd87 | ||
|
|
568257a192 | ||
|
|
fcb2eb6658 | ||
|
|
744563c188 | ||
|
|
2eee8128b0 | ||
|
|
d3418738ad | ||
|
|
90e9ae308e | ||
|
|
f119d2c921 | ||
|
|
31e64b9fe9 | ||
|
|
e0f5001182 | ||
|
|
bdbad98327 | ||
|
|
9e56c2727b | ||
|
|
688a63e671 | ||
|
|
8b61d7a328 | ||
|
|
70df9c55e5 | ||
|
|
6786970c96 | ||
|
|
69e2c65be6 | ||
|
|
31bdcdbc76 | ||
|
|
33f59aef2c | ||
|
|
7d759f0ff0 | ||
|
|
8f3363e2dc | ||
|
|
f7b5e313c1 | ||
|
|
7317627b97 | ||
|
|
603d513643 | ||
|
|
8c6433bd2d | ||
|
|
e45997fb5b | ||
|
|
8595c67df0 | ||
|
|
78684aa18a | ||
|
|
889c2e069c | ||
|
|
f6a43568d3 | ||
|
|
a275faa586 | ||
|
|
8caa101439 | ||
|
|
af102baecd | ||
|
|
68315cea8a | ||
|
|
6f2a2915f1 | ||
|
|
55d64c7e70 | ||
|
|
6a7a393df5 | ||
|
|
51bdea1303 | ||
|
|
b91ecf3c01 | ||
|
|
86d86258a8 | ||
|
|
13761dbf67 | ||
|
|
5bb12d0099 | ||
|
|
83dc61a54c | ||
|
|
e9ea98678c | ||
|
|
3773827715 | ||
|
|
0aaddbd76b | ||
|
|
a944dd940a | ||
|
|
f8a66ca76c | ||
|
|
7508da11c1 | ||
|
|
e1b64f9afd | ||
|
|
1aae0bcc3a | ||
|
|
297371e6e2 | ||
|
|
c7f007686a | ||
|
|
ebcd830693 | ||
|
|
5b77850dc9 | ||
|
|
ced613c678 | ||
|
|
6130280f8b | ||
|
|
93e16428d8 | ||
|
|
4032c3e286 | ||
|
|
7b2908809c | ||
|
|
16228ae499 | ||
|
|
a9c7ca91fd | ||
|
|
07e49f8d23 | ||
|
|
5748d6ac30 | ||
|
|
23bb50c71c | ||
|
|
767db9417b | ||
|
|
6047927eed | ||
|
|
d2a21fe776 | ||
|
|
ed20cb4f90 | ||
|
|
92d491ea13 | ||
|
|
bc214d28c7 | ||
|
|
82d495aa0c | ||
|
|
a9a77ee7e5 | ||
|
|
dc8a0ee15f | ||
|
|
2ac6397368 | ||
|
|
08b222bdba | ||
|
|
12cbe54650 | ||
|
|
19f6ab70ae | ||
|
|
01bc01cb9d | ||
|
|
ce8f111758 | ||
|
|
017f032b4c | ||
|
|
ce44eb6921 | ||
|
|
5868616810 | ||
|
|
bc2c0c4f80 | ||
|
|
5ebdc184c0 | ||
|
|
da6a697cda | ||
|
|
9262ff7ec4 | ||
|
|
a662bc24aa | ||
|
|
88a3daa978 | ||
|
|
cef66defbd | ||
|
|
2b77ee80e0 | ||
|
|
a5c25ada1e | ||
|
|
3a0d9bbc57 | ||
|
|
216582d703 | ||
|
|
3dd76a1941 | ||
|
|
a59e0e3a14 | ||
|
|
a3aea47459 | ||
|
|
9a1cb9890b | ||
|
|
fc28a3d8d1 | ||
|
|
00639f89bd | ||
|
|
31bd301b28 | ||
|
|
64706465de | ||
|
|
63046dbbf5 | ||
|
|
c5a2c40694 | ||
|
|
e83645d702 | ||
|
|
275a1f4d5d | ||
|
|
28ff8adcc6 | ||
|
|
e99f973b63 | ||
|
|
c038d83fc7 | ||
|
|
7040d26757 | ||
|
|
2da9eaf914 | ||
|
|
93ac88b70f | ||
|
|
28a1399bbd | ||
|
|
5928eeee5b | ||
|
|
03f5610c97 | ||
|
|
0395910391 | ||
|
|
073ac1c406 | ||
|
|
8fae0052c8 | ||
|
|
33017b702d | ||
|
|
8ebe5e3a3e | ||
|
|
0b09c4ad8d | ||
|
|
c0d891b08b | ||
|
|
e6876b288a | ||
|
|
067d1e907f | ||
|
|
8077019fc1 | ||
|
|
49b040c94e | ||
|
|
d343b0345e | ||
|
|
68dee159c5 | ||
|
|
4c9166a9e1 | ||
|
|
1727db8ee5 | ||
|
|
17065444e9 | ||
|
|
64c98ef08b | ||
|
|
0f2c27bcb0 | ||
|
|
19cd07f059 | ||
|
|
6563350ded | ||
|
|
3fb325998d | ||
|
|
bc06e241ea | ||
|
|
23491541f6 | ||
|
|
b4985d1e63 | ||
|
|
138a12c481 | ||
|
|
8b72fa3fbf | ||
|
|
5d12f318b3 | ||
|
|
0978bbe120 |
@@ -3,7 +3,7 @@ engines:
|
||||
enabled: false
|
||||
rubocop:
|
||||
enabled: true
|
||||
channel: rubocop-0-49
|
||||
channel: rubocop-0-54
|
||||
|
||||
exclude_paths:
|
||||
- .codeclimate.yml
|
||||
@@ -29,6 +29,8 @@ exclude_paths:
|
||||
- test/**/*
|
||||
- vendor/**/*
|
||||
|
||||
- lib/jekyll/commands/serve/livereload_assets/livereload.js
|
||||
|
||||
ratings:
|
||||
paths:
|
||||
- lib/**/*.rb
|
||||
|
||||
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -48,7 +48,7 @@
|
||||
## My Reproduction Steps
|
||||
|
||||
<!--
|
||||
If this error occured on GitHub Pages, please try to provide us with logs,
|
||||
If this error occurred on GitHub Pages, please try to provide us with logs,
|
||||
and look at them yourself, to determine if this is an actual Jekyll bug. In
|
||||
the event you are unsure, file a ticket, however, when you do please provide
|
||||
the logs (strip them of personal information.)
|
||||
|
||||
2
.github/first-timers-issue-template.md
vendored
2
.github/first-timers-issue-template.md
vendored
@@ -12,7 +12,7 @@ Nothing. This issue is meant to welcome you to Open Source :) We are happy to wa
|
||||
|
||||
- [ ] 👌 **Join the team**: Add yourself to a Jekyll affinity team.
|
||||
|
||||
Go to [teams.jekyllrb.com](https://teams.jekyllrb.com/) and join a team that best fits your interests. Once you click the link to join a team, you will soon recieve an email inviting you to join the Jekyll organization.
|
||||
Go to [teams.jekyllrb.com](https://teams.jekyllrb.com/) and join a team that best fits your interests. Once you click the link to join a team, you will soon receive an email inviting you to join the Jekyll organization.
|
||||
|
||||
- [ ] 🙋 **Claim this issue**: Comment below.
|
||||
|
||||
|
||||
92
.rubocop.yml
92
.rubocop.yml
@@ -8,9 +8,10 @@ Jekyll/NoPutsAllowed:
|
||||
- rake/*.rake
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.1
|
||||
TargetRubyVersion: 2.3
|
||||
Include:
|
||||
- lib/**/*.rb
|
||||
- test/**/*.rb
|
||||
Exclude:
|
||||
- bin/**/*
|
||||
- exe/**/*
|
||||
@@ -18,44 +19,30 @@ AllCops:
|
||||
- script/**/*
|
||||
- vendor/**/*
|
||||
- tmp/**/*
|
||||
Layout/AlignArray:
|
||||
Enabled: false
|
||||
Layout/AlignHash:
|
||||
EnforcedHashRocketStyle: table
|
||||
Layout/AlignParameters:
|
||||
Enabled: false
|
||||
Layout/EmptyLinesAroundAccessModifier:
|
||||
Enabled: false
|
||||
Layout/EmptyLinesAroundModuleBody:
|
||||
Enabled: false
|
||||
Layout/EndOfLine:
|
||||
EnforcedStyle: native
|
||||
Layout/ExtraSpacing:
|
||||
AllowForAlignment: true
|
||||
Layout/FirstParameterIndentation:
|
||||
EnforcedStyle: consistent
|
||||
Layout/IndentationWidth:
|
||||
Severity: error
|
||||
Layout/IndentArray:
|
||||
EnforcedStyle: consistent
|
||||
Layout/IndentHash:
|
||||
EnforcedStyle: consistent
|
||||
Layout/IndentHeredoc:
|
||||
Enabled: false
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
EnforcedStyle: indented
|
||||
Layout/MultilineOperationIndentation:
|
||||
EnforcedStyle: indented
|
||||
Layout/SpaceInsideBrackets:
|
||||
Lint/NestedPercentLiteral:
|
||||
Exclude:
|
||||
- test/test_site.rb
|
||||
Layout/EmptyComment:
|
||||
Enabled: false
|
||||
Lint/EndAlignment:
|
||||
Layout/EndAlignment:
|
||||
Severity: error
|
||||
Lint/UnreachableCode:
|
||||
Severity: error
|
||||
Lint/UselessAccessModifier:
|
||||
Enabled: false
|
||||
Lint/Void:
|
||||
Enabled: false
|
||||
Exclude:
|
||||
- lib/jekyll/site.rb
|
||||
Metrics/AbcSize:
|
||||
Max: 21
|
||||
Metrics/BlockLength:
|
||||
@@ -63,22 +50,26 @@ Metrics/BlockLength:
|
||||
- test/**/*.rb
|
||||
- lib/jekyll/configuration.rb
|
||||
- rake/*.rake
|
||||
- jekyll.gemspec
|
||||
Metrics/ClassLength:
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb$/
|
||||
- !ruby/regexp /test\/.*.rb$/
|
||||
Max: 300
|
||||
- lib/jekyll/document.rb
|
||||
- lib/jekyll/site.rb
|
||||
- lib/jekyll/commands/serve.rb
|
||||
- lib/jekyll/configuration.rb
|
||||
Max: 240
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 9
|
||||
Exclude:
|
||||
- lib/jekyll/utils.rb
|
||||
- lib/jekyll/commands/serve.rb
|
||||
Metrics/LineLength:
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb/
|
||||
- Rakefile
|
||||
- rake/*.rake
|
||||
- Gemfile
|
||||
- jekyll.gemspec
|
||||
Max: 90
|
||||
Max: 100
|
||||
Severity: warning
|
||||
Metrics/MethodLength:
|
||||
CountComments: false
|
||||
@@ -93,7 +84,16 @@ Metrics/PerceivedComplexity:
|
||||
Naming/FileName:
|
||||
Enabled: false
|
||||
Naming/HeredocDelimiterNaming:
|
||||
Enabled: false
|
||||
Exclude:
|
||||
- test/**/*.rb
|
||||
Naming/MemoizedInstanceVariableName:
|
||||
Exclude:
|
||||
- lib/jekyll/page_without_a_file.rb
|
||||
- lib/jekyll/drops/unified_payload_drop.rb
|
||||
- lib/jekyll/drops/site_drop.rb
|
||||
Naming/UncommunicativeMethodParamName:
|
||||
AllowedNames:
|
||||
- _
|
||||
Security/MarshalLoad:
|
||||
Exclude:
|
||||
- !ruby/regexp /test\/.*.rb$/
|
||||
@@ -102,31 +102,32 @@ Security/YAMLLoad:
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb/
|
||||
- !ruby/regexp /test\/.*.rb$/
|
||||
Style/Alias:
|
||||
Style/AccessModifierDeclarations:
|
||||
Enabled: false
|
||||
Style/Alias:
|
||||
EnforcedStyle: prefer_alias_method
|
||||
Style/AndOr:
|
||||
Severity: error
|
||||
Style/BracesAroundHashParameters:
|
||||
Enabled: false
|
||||
Style/ClassAndModuleChildren:
|
||||
Enabled: false
|
||||
Exclude:
|
||||
- test/**/*.rb
|
||||
Style/FrozenStringLiteralComment:
|
||||
EnforcedStyle: always
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
Exclude:
|
||||
- !ruby/regexp /features\/.*.rb$/
|
||||
Style/DoubleNegation:
|
||||
Enabled: false
|
||||
Style/FormatStringToken:
|
||||
Exclude:
|
||||
- lib/jekyll/utils/ansi.rb
|
||||
Style/GuardClause:
|
||||
Enabled: false
|
||||
Style/HashSyntax:
|
||||
EnforcedStyle: hash_rockets
|
||||
Severity: error
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
Style/InverseMethods:
|
||||
Enabled: false
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
- test/helper.rb
|
||||
Style/ModuleFunction:
|
||||
Enabled: false
|
||||
Style/MultilineTernaryOperator:
|
||||
@@ -140,23 +141,22 @@ Style/PercentLiteralDelimiters:
|
||||
"%w": "()"
|
||||
"%W": "()"
|
||||
"%x": "()"
|
||||
Style/RedundantReturn:
|
||||
Enabled: false
|
||||
Style/RedundantSelf:
|
||||
Enabled: false
|
||||
Style/RegexpLiteral:
|
||||
EnforcedStyle: percent_r
|
||||
Style/RescueModifier:
|
||||
Enabled: false
|
||||
Style/SafeNavigation:
|
||||
Exclude:
|
||||
- lib/jekyll/document.rb
|
||||
Style/SignalException:
|
||||
EnforcedStyle: only_raise
|
||||
Style/SingleLineMethods:
|
||||
Enabled: false
|
||||
Style/StringLiterals:
|
||||
EnforcedStyle: double_quotes
|
||||
Style/StringLiteralsInInterpolation:
|
||||
EnforcedStyle: double_quotes
|
||||
Style/SymbolArray:
|
||||
Enabled: false
|
||||
Style/TrailingCommaInLiteral:
|
||||
EnforcedStyle: brackets
|
||||
Style/TrailingCommaInArrayLiteral:
|
||||
EnforcedStyleForMultiline: consistent_comma
|
||||
Style/TrailingCommaInHashLiteral:
|
||||
EnforcedStyleForMultiline: consistent_comma
|
||||
|
||||
14
.travis.yml
14
.travis.yml
@@ -5,20 +5,19 @@ language: ruby
|
||||
sudo: false
|
||||
|
||||
rvm:
|
||||
- &ruby1 2.5.0
|
||||
- &ruby2 2.4.3
|
||||
- &ruby3 2.3.6
|
||||
- &ruby4 2.2.9
|
||||
- &jruby jruby-9.1.15.0
|
||||
- &ruby1 2.5.1
|
||||
- &ruby2 2.4.4
|
||||
- &ruby3 2.3.7
|
||||
- &jruby jruby-9.1.16.0
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- rvm: *ruby1
|
||||
env: TEST_SUITE=fmt
|
||||
name: "🤖️ Code Format"
|
||||
- rvm: *ruby1
|
||||
env: TEST_SUITE=default-site
|
||||
- rvm: *ruby1
|
||||
env: ROUGE_VERSION=1.11.1 # runs everything with this version
|
||||
name: "🏠️ Default Site"
|
||||
exclude:
|
||||
- rvm: *jruby
|
||||
env: TEST_SUITE=cucumber
|
||||
@@ -55,3 +54,4 @@ after_success:
|
||||
|
||||
before_install:
|
||||
- gem update --system
|
||||
- gem install bundler --version 1.16.2
|
||||
|
||||
@@ -1,49 +1,46 @@
|
||||
# Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of
|
||||
fostering an open and welcoming community, we pledge to respect all people who
|
||||
contribute through reporting issues, posting feature requests, updating
|
||||
documentation, submitting pull requests or patches, and other activities.
|
||||
## Our Pledge
|
||||
|
||||
We are committed to making participation in this project a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, religion, or nationality.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
## Our Responsibilities
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to
|
||||
fairly and consistently applying these principles to every aspect of managing
|
||||
this project. Project maintainers who do not follow or enforce the Code of
|
||||
Conduct may be permanently removed from the project team.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by opening an issue or contacting a project maintainer. All complaints
|
||||
will be reviewed and investigated and will result in a response that is deemed
|
||||
necessary and appropriate to the circumstances. Maintainers are obligated to
|
||||
maintain confidentiality with regard to the reporter of an incident.
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.3.0, available at
|
||||
[http://contributor-covenant.org/version/1/3/0/][version]
|
||||
## Enforcement
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting a project maintainer. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org/
|
||||
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
20
Gemfile
20
Gemfile
@@ -5,11 +5,6 @@ gemspec :name => "jekyll"
|
||||
|
||||
gem "rake", "~> 12.0"
|
||||
|
||||
gem "rouge", ENV["ROUGE"] if ENV["ROUGE"]
|
||||
|
||||
# Dependency of jekyll-mentions. RubyGems in Ruby 2.1 doesn't shield us from this.
|
||||
gem "activesupport", "~> 4.2", :groups => [:test_legacy, :site] if RUBY_VERSION < "2.2.2"
|
||||
|
||||
group :development do
|
||||
gem "launchy", "~> 2.3"
|
||||
gem "pry"
|
||||
@@ -23,15 +18,14 @@ end
|
||||
|
||||
group :test do
|
||||
gem "codeclimate-test-reporter", "~> 1.0.5"
|
||||
gem "cucumber", RUBY_VERSION >= "2.2" ? "~> 3.0" : "3.0.1"
|
||||
gem "cucumber", "~> 3.0"
|
||||
gem "httpclient"
|
||||
gem "jekyll_test_plugin"
|
||||
gem "jekyll_test_plugin_malicious"
|
||||
# nokogiri v1.8 does not work with ruby 2.1 and below
|
||||
gem "nokogiri", RUBY_VERSION >= "2.2" ? "~> 1.7" : "~> 1.7.0"
|
||||
gem "nokogiri", "~> 1.7"
|
||||
gem "rspec"
|
||||
gem "rspec-mocks"
|
||||
gem "rubocop", "~> 0.51.0"
|
||||
gem "rubocop", "~> 0.57.2"
|
||||
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
|
||||
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)
|
||||
|
||||
@@ -41,7 +35,7 @@ end
|
||||
#
|
||||
|
||||
group :test_legacy do
|
||||
if RUBY_PLATFORM =~ %r!cygwin! || RUBY_VERSION.start_with?("2.2")
|
||||
if RUBY_PLATFORM =~ %r!cygwin!
|
||||
gem "test-unit"
|
||||
end
|
||||
|
||||
@@ -75,16 +69,14 @@ group :jekyll_optional_dependencies do
|
||||
gem "jekyll-redirect-from"
|
||||
gem "kramdown", "~> 1.14"
|
||||
gem "mime-types", "~> 3.0"
|
||||
gem "rdoc", RUBY_VERSION >= "2.2.2" ? "~> 6.0" : "~> 5.1"
|
||||
gem "rdoc", "~> 6.0"
|
||||
gem "tomlrb", "~> 1.2"
|
||||
|
||||
platform :ruby, :mswin, :mingw, :x64_mingw do
|
||||
gem "classifier-reborn", "~> 2.2.0"
|
||||
gem "liquid-c", "~> 3.0"
|
||||
gem "pygments.rb", "~> 1.0"
|
||||
gem "rdiscount", "~> 2.0"
|
||||
gem "redcarpet", "~> 3.2", ">= 3.2.3"
|
||||
gem "yajl-ruby", "~> 1.3.1"
|
||||
gem "yajl-ruby", "~> 1.3"
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
|
||||
224
History.markdown
224
History.markdown
@@ -1,6 +1,218 @@
|
||||
## HEAD
|
||||
|
||||
* Textile is only supported through a converter plugin (#7003)
|
||||
|
||||
### Documentation
|
||||
|
||||
* Release post for v3.8.0 (#6849)
|
||||
* Add Installation Instructions for Ubuntu (#6925)
|
||||
* add liquid tag jekyll-flickr (#6946)
|
||||
* Add 4.0 development post (#6934)
|
||||
* Updated copy - fixed casing of SaaS on resources page. (#6949)
|
||||
* WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
|
||||
* Don't prompt for sudo when installing with Ubuntu WSL (#6781)
|
||||
* Fix typo (#6969)
|
||||
* Add version number for group_by_exp doc (#6956)
|
||||
* Update Windows install docs (#6926)
|
||||
* Remove documentation for using Redcarpet (#6990)
|
||||
* Updated nginx configuration for custom-404-page documentation (#6994)
|
||||
* List all static files variables (#7002)
|
||||
* Document that _drafts need to be contained within the custom collection directory (#6985)
|
||||
* proposed change for passive voice. (#7005)
|
||||
* added the CAT plugin to the plugin list (#7011)
|
||||
* Updated to supported version (#7031)
|
||||
* Clarify definition of 'draft' (#7037)
|
||||
* Listed the jekyll-target-blank plugin in plugins list. (#7046)
|
||||
* Typo (#7058)
|
||||
* Add Hints for some Improved Travis Config in Doc (#7049)
|
||||
* Added plugin json-get. (#7086)
|
||||
* Update travis-ci.md to point out "this is an example Gemfile" (#7089)
|
||||
* Adding `jekyll-info` plugin (#7091)
|
||||
* GitHub enables you to use themes from other repos (#7112)
|
||||
* Updates to CODE OF CONDUCT (v1.4.0) (#7105)
|
||||
* Instructions to view theme’s files under Linux (#7095)
|
||||
* add jekyll-xml-source (#7114)
|
||||
* Add the jekyll-firstimage filter plugin (#7127)
|
||||
* Use a real theme in the example (#7125)
|
||||
* Update docs about post creation (#7138)
|
||||
* Add DEV Community's Jekyll tag to community page (#7139)
|
||||
* Initialize upgrading doc for v4.0 (#7140)
|
||||
* Add version badge for date filters with ordinal (#7162)
|
||||
* Add closing tags for <a> (#7163)
|
||||
* Add TSV to list of supported _data files. (#7168)
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* use jekyll-compose if installed (#6932)
|
||||
* Memoize computing excerpt's relative_path (#6951)
|
||||
* Liquefied link tag (#6269)
|
||||
* Suggest re-running command with --trace on fail (#6551)
|
||||
* Update item_property to return numbers as numbers instead of strings (#6608)
|
||||
* Use .markdown for page templates (#7126)
|
||||
* Fix custom 404 page for GitHub pages (#7132)
|
||||
|
||||
### Major Enhancements
|
||||
|
||||
* Remove unused error class (#6511)
|
||||
* Drop support for Ruby 2.1 and 2.2 (#6560)
|
||||
* Add vendor folder to a newly installed site's .gitignore (#6968)
|
||||
* bump i18n (#6931)
|
||||
* We are not using Ruby 2.2 anymore (#6977)
|
||||
* Drop support for older versions of Rouge (#6978)
|
||||
* Remove support for Redcarpet (#6987)
|
||||
* Remove support for rdiscount (#6988)
|
||||
* Remove 'cache_dir' during `jekyll clean` (#7158)
|
||||
* Output Jekyll Version while debugging (#7173)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Remove unnecessary Jekyll::Page constant (#6770)
|
||||
* Loggers should accept both numbers and symbols (#6967)
|
||||
* Update instructions for releasing docs Gem (#6975)
|
||||
* yajl-ruby update to v1.4.0 (#6976)
|
||||
* Load Rouge for TestKramdown (#7007)
|
||||
* Useless privates removed (#6768)
|
||||
* Allow i18n v0.9.5 and higher (#7044)
|
||||
* Update Rubocop's config (#7050)
|
||||
* Remember to release docs gem (#7066)
|
||||
* Use assert_include (#7093)
|
||||
* Update rubocop version to 0.57.x ### -docs (#7078)
|
||||
* Example of CircleCI deployment through CircleCI v2 (#7024)
|
||||
* Fix Rubocop offences in test files (#7128)
|
||||
* fix up refute_equal call (#7133)
|
||||
* Fix incorrectly passed arguments to assert_equal (#7134)
|
||||
* Lock Travis to Bundler-1.16.2 (#7144)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add call to unused method `validate_options` in `commands/serve.rb` (#7122)
|
||||
|
||||
### feature
|
||||
|
||||
* Disable Liquid via front matter (#6824)
|
||||
* Do not process Liquid in post excerpt when disabled in front matter (#7146)
|
||||
|
||||
## 3.8.3 / 2018-06-05
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix --unpublished not affecting collection documents (#7027)
|
||||
|
||||
## 3.8.2 / 2018-05-18
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Update rubocop version (#7016)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add whitespace control to LIQUID_TAG_REGEX (#7015)
|
||||
|
||||
## 3.8.1 / 2018-05-01
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix rendering Liquid constructs in excerpts (#6945)
|
||||
* Liquify documents unless published == false (#6959)
|
||||
|
||||
## 3.8.0 / 2018-04-19
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* move duplicate code to a single private method (#6593)
|
||||
* Test against Ruby 2.5 on AppVeyor (#6668)
|
||||
* Replace simple regex with a native Ruby method (#6732)
|
||||
* Codeclimate: exclude livereload.js (#6776)
|
||||
* Add a cucumber feature to test link tag (#6777)
|
||||
* Fix theme gem feature (#6784)
|
||||
* Replace simple regex with equivalent Ruby methods (#6736)
|
||||
* Rewrite `script/rubyprof` as a Ruby script (#6813)
|
||||
* Add debug output to theme rendering (#5195)
|
||||
* fix minitest deprecation warning in test (#6839)
|
||||
* Memoize `Site#site_data` (#6809)
|
||||
* Memoize document output extension (#6814)
|
||||
* Access document permalink attribute efficiently (#6740)
|
||||
* Minimize array allocations in the `where` filter (#6860)
|
||||
* Bump JRuby (#6878)
|
||||
* Assert existence of <collection>.files (#6907)
|
||||
* Bump Rubocop to 0.54.x (#6915)
|
||||
* Regenerate unconditionally unless its an incremental build (#6917)
|
||||
* Centralize require statements (#6910)
|
||||
* Bump to Rubocop 0.55 (#6929)
|
||||
* Refactor private method `HighlightBlock#parse_options` (#6822)
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Two massive performance improvements for large sites (#6730)
|
||||
* Cache the list of documents to be written (#6741)
|
||||
* Allow Jekyll Doctor to detect stray posts dir (#6681)
|
||||
* Excerpt relative-path should match its path (#6597)
|
||||
* Remind user to resolve conflict in `jekyll new` with `--force` (#6801)
|
||||
* Memoize helper methods in site-cleaner (#6808)
|
||||
* Compute document's relative_path faster (#6767)
|
||||
* Create a single instance of PostReader per site (#6759)
|
||||
* Allow date filters to output ordinal days (#6773)
|
||||
* Change regex to sanitize and normalize filenames passed to LiquidRenderer (#6610)
|
||||
* Allow passing :strict_variables and :strict_filters options to Liquid's renderer (#6726)
|
||||
* Debug writing files during the build process (#6696)
|
||||
* Improve regex usage in `Tags::IncludeTag` (#6848)
|
||||
* Improve comment included in the starter index.md (#6916)
|
||||
* Store and retrieve converter instances for Jekyll::Filters via a hash (#6856)
|
||||
* Implement a cache within the `where` filter (#6868)
|
||||
* Store regexp in a constant (#6887)
|
||||
* Optimize computing filename in LiquidRenderer (#6841)
|
||||
|
||||
### Documentation
|
||||
|
||||
* Adding the jekyll-algolia plugin to the list of plugins (#6737)
|
||||
* Added Premonition plugin to list of plugins (#6750)
|
||||
* Add document on releasing a new version (#6745)
|
||||
* Mention Talkyard, a new commenting system for Jekyll and others. (#6752)
|
||||
* Add 'jekyll-fontello' to plugins (#6757)
|
||||
* Install dh-autoreconf on Windows (#6765)
|
||||
* Fix common typos (#6764)
|
||||
* Fix documentation for `{{ page.excerpt }}` (#6779)
|
||||
* Update docs on permalink configuration (#6775)
|
||||
* Propose fix some typos (#6785)
|
||||
* Say hello to Jekyll's New Lead Developer (#6790)
|
||||
* Add reference to Liquid to plugin docs (#6794)
|
||||
* Draft a release post for v3.7.3 (#6803)
|
||||
* add missing step for gem-based theme conversion (#6802)
|
||||
* Update windows.md to explain an issue with jekyll new. (#6838)
|
||||
* Add Bundler Installation Instructions (#6828)
|
||||
* Docs: describe difference between tags and categories (#6882)
|
||||
* Add `jekyll-random` plugin to docs (#6833)
|
||||
* Fixed typo in description of categories and tags (#6896)
|
||||
* Add missing ul-tag (#6897)
|
||||
* doc: add liquid tag plugin jekyll-onebox for html previews (#6898)
|
||||
* Add `jekyll-w2m` to plugins (#6855)
|
||||
* Fix tutorials navigation HTML (#6919)
|
||||
* add Arch Linux instalation troubleshoot (#6782)
|
||||
* Docs: Install Jekyll on macOS (#6881)
|
||||
* Fix CodeClimate badges [ci skip] (#6930)
|
||||
* Update index.md (#6933)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Remove links to Gists (#6751)
|
||||
* Always load Google Fonts over HTTPS (#6792)
|
||||
* always load analytics.js over HTTPS (#6807)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Append appropriate closing tag to Liquid block in an excerpt ### -minor (#6724)
|
||||
* Bypass rendering via Liquid unless required (#6735)
|
||||
* Delegated methods after `private` keyword are meant to be private (#6819)
|
||||
* Improve handling non-default collection documents rendering and writing (#6795)
|
||||
* Fix passing multiline params to include tag when using the variable syntax (#6858)
|
||||
* `include_relative` tag should find related documents in collections gathered within custom `collections_dir` (#6818)
|
||||
* Handle liquid tags in excerpts robustly (#6891)
|
||||
* Allow front matter defaults to be applied properly to documents gathered under custom `collections_dir` (#6885)
|
||||
|
||||
## 3.7.3 / 2018-02-25
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Do not hardcode locale unless certainly necessary (#6791)
|
||||
|
||||
## 3.7.2 / 2018-01-25
|
||||
@@ -33,7 +245,7 @@
|
||||
* inform that symlinks are not allowed in safe mode (#6670)
|
||||
* Glob scope path only if configured with a pattern (#6692)
|
||||
* Add gem "wdm" to all newly generated Gemfiles (#6711)
|
||||
* Fix timezone incosistencies between different ruby version (#6697)
|
||||
* Fix timezone inconsistencies between different ruby version (#6697)
|
||||
* Refactor collections_dir feature for consistency (#6685)
|
||||
|
||||
### Minor Enhancements
|
||||
@@ -134,7 +346,7 @@
|
||||
* Add jekyll-pwa-plugin (#6533)
|
||||
* Remove Jekyll-Smartify from plugins directory (#6548)
|
||||
* Updated Jekyll-Pug listing to include official website (#6555)
|
||||
* Remove link to severly outdated asset plugin (#6613)
|
||||
* Remove link to severely outdated asset plugin (#6613)
|
||||
* Default time zone depends upon server (#6617)
|
||||
* Add `disqus-for-jekyll` to plugins. (#6618)
|
||||
* Update "Requirements" for Ruby version (#6623)
|
||||
@@ -711,9 +923,9 @@
|
||||
* Update appveyor.yml and fix optional deps for Ruby x64 (#5180)
|
||||
* Improve tests for Jekyll::PluginManager (#5167)
|
||||
* Update Ruby versions in travis.yml (#5221)
|
||||
* Avoid installing unecessary gems for site testing (#5272)
|
||||
* Avoid installing unnecessary gems for site testing (#5272)
|
||||
* Proposal: Affinity teams and their captains (#5273)
|
||||
* Replace duplicate with postive local test in issue template (#5286)
|
||||
* Replace duplicate with positive local test in issue template (#5286)
|
||||
* Update AppVeyor config. (#5240)
|
||||
* Execute jekyll from clone instead of defined binary when running 'script/default-site' (#5295)
|
||||
* rubocop: lib/jekyll/document.rb complexity fixes (#5045)
|
||||
@@ -757,7 +969,7 @@
|
||||
* Allow collections to have documents that have no file extension (#4545)
|
||||
* Add size property to `group_by` result (#4557)
|
||||
* Site Template: Removed unnecessary nesting from `_base.scss` (#4637)
|
||||
* Adding a debug log statment for skipped future documents. (#4558)
|
||||
* Adding a debug log statement for skipped future documents. (#4558)
|
||||
* Site Template: Changed main `<div>` to `<main>` and added accessibility info (#4636)
|
||||
* Add array support to `where` filter (#4555)
|
||||
* 'jekyll clean': also remove .sass-cache (#4652)
|
||||
@@ -1066,7 +1278,7 @@
|
||||
* utils/drops: update Drop to support `Utils.deep_merge_hashes` (#4289)
|
||||
* Make sure jekyll/drops/drop is loaded first. (#4292)
|
||||
* Convertible/Page/Renderer: use payload hash accessor & setter syntax for backwards-compatibility (#4311)
|
||||
* Drop: fix hash setter precendence (#4312)
|
||||
* Drop: fix hash setter precedence (#4312)
|
||||
* utils: `has_yaml_header?` should accept files with extraneous spaces (#4290)
|
||||
* Escape html from site.title and page.title in site template (#4307)
|
||||
* Allow custom file extensions if defined in `permalink` YAML front matter (#4314)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
[][ruby-gems]
|
||||
[][travis]
|
||||
[][appveyor]
|
||||
[][coverage]
|
||||
[][codeclimate]
|
||||
[][gemnasium]
|
||||
[][codeclimate]
|
||||
[][coverage]
|
||||
[][hakiri]
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
[ruby-gems]: https://rubygems.org/gems/jekyll
|
||||
[gemnasium]: https://gemnasium.com/jekyll/jekyll
|
||||
[codeclimate]: https://codeclimate.com/github/jekyll/jekyll
|
||||
[coverage]: https://codeclimate.com/github/jekyll/jekyll/coverage
|
||||
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
|
||||
@@ -45,7 +45,7 @@ conduct.
|
||||
Please adhere to this code of conduct in any interactions you have in the
|
||||
Jekyll community. It is strictly enforced on all official Jekyll
|
||||
repositories, websites, and resources. If you encounter someone violating
|
||||
these terms, please let one of our core team members [Olivia](mailto:olivia@jekyllrb.com?subject=Jekyll%20CoC%20Violation), [Pat](mailto:pat@jekyllrb.com?subject=Jekyll%20CoC%20Violation), [Matt](mailto:matt@jekyllrb.com?subject=Jekyll%20CoC%20Violation) or [Parker](mailto:parker@jekyllrb.com?subject=Jekyll%20CoC%20Violation) know and we will address it as soon as possible.
|
||||
these terms, please let one of our [core team members](https://jekyllrb.com/team/#core-team) know and we will address it as soon as possible.
|
||||
|
||||
## Diving In
|
||||
|
||||
@@ -56,6 +56,28 @@ these terms, please let one of our core team members [Olivia](mailto:olivia@jeky
|
||||
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
|
||||
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
|
||||
|
||||
## Credits
|
||||
|
||||
### Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
|
||||
|
||||
<a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
|
||||
|
||||
<a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
|
||||
<a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
|
||||
<a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
|
||||
|
||||
|
||||
## License
|
||||
|
||||
See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
|
||||
|
||||
14
appveyor.yml
14
appveyor.yml
@@ -16,18 +16,18 @@ install:
|
||||
environment:
|
||||
BUNDLE_WITHOUT: "benchmark:site:development"
|
||||
matrix:
|
||||
- RUBY_FOLDER_VER: "24"
|
||||
- RUBY_FOLDER_VER: "25"
|
||||
TEST_SUITE: "test"
|
||||
- RUBY_FOLDER_VER: "25"
|
||||
TEST_SUITE: "cucumber"
|
||||
- RUBY_FOLDER_VER: "25"
|
||||
TEST_SUITE: "default-site"
|
||||
- RUBY_FOLDER_VER: "25-x64"
|
||||
TEST_SUITE: "test"
|
||||
- RUBY_FOLDER_VER: "24"
|
||||
TEST_SUITE: "cucumber"
|
||||
- RUBY_FOLDER_VER: "24"
|
||||
TEST_SUITE: "default-site"
|
||||
- RUBY_FOLDER_VER: "24-x64"
|
||||
TEST_SUITE: "test"
|
||||
- RUBY_FOLDER_VER: "23"
|
||||
TEST_SUITE: "test"
|
||||
- RUBY_FOLDER_VER: "22"
|
||||
TEST_SUITE: "test"
|
||||
|
||||
test_script:
|
||||
- ruby --version
|
||||
|
||||
101
benchmark/conditional_liquid.rb
Executable file
101
benchmark/conditional_liquid.rb
Executable file
@@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "liquid"
|
||||
require "benchmark/ips"
|
||||
|
||||
# Test if processing content string without any Liquid constructs, via Liquid,
|
||||
# is slower than checking whether constructs exist ( using `String#include?` )
|
||||
# and return-ing the "plaintext" content string as is..
|
||||
#
|
||||
# Ref: https://github.com/jekyll/jekyll/pull/6735
|
||||
|
||||
# Sample contents
|
||||
WITHOUT_LIQUID = <<-TEXT.freeze
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
|
||||
pharetra tempus. Etiam bibendum magna et metus fermentum, eu cursus lorem
|
||||
mattis. Curabitur vel dui et lacus rutrum suscipit et eget neque.
|
||||
|
||||
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
|
||||
ligula, at finibus eros laoreet id. Etiam sit amet est in libero efficitur
|
||||
tristique. Ut nec magna augue. Quisque ut fringilla lacus, ac dictum enim.
|
||||
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
|
||||
aliquet. Sed ultrices placerat ultricies.
|
||||
TEXT
|
||||
|
||||
WITH_LIQUID = <<-LIQUID.freeze
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
|
||||
pharetra tempus. {{ author }} et metus fermentum, eu cursus lorem
|
||||
mattis. Curabitur vel dui et lacus rutrum suscipit et eget neque.
|
||||
|
||||
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
|
||||
ligula, {% if author == "Jane Doe" %} at finibus eros laoreet id. {% else %}
|
||||
Etiam sit amet est in libero efficitur.{% endif %}
|
||||
tristique. Ut nec magna augue. Quisque ut fringilla lacus, ac dictum enim.
|
||||
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
|
||||
aliquet. Sed ultrices placerat ultricies.
|
||||
LIQUID
|
||||
|
||||
WITH_JUST_LIQUID_VAR = <<-LIQUID.freeze
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor libero at
|
||||
pharetra tempus. et metus fermentum, eu cursus lorem, ac dictum enim.
|
||||
mattis. Curabitur vel dui et lacus rutrum suscipit et {{ title }} neque.
|
||||
|
||||
Nullam luctus fermentum est id blandit. Phasellus consectetur ullamcorper
|
||||
ligula, at finibus eros laoreet id. Etiam sit amet est in libero efficitur.
|
||||
tristique. Ut nec magna augue. {{ author }} Quisque ut fringilla lacus
|
||||
Aliquam vel ornare mauris. Suspendisse ornare diam tempor nulla facilisis
|
||||
aliquet. Sed ultrices placerat ultricies.
|
||||
LIQUID
|
||||
|
||||
SUITE = {
|
||||
:"plain text" => WITHOUT_LIQUID,
|
||||
:"tags n vars" => WITH_LIQUID,
|
||||
:"just vars" => WITH_JUST_LIQUID_VAR,
|
||||
}.freeze
|
||||
|
||||
# Mimic how Jekyll's LiquidRenderer would process a non-static file, with
|
||||
# some dummy payload
|
||||
def always_liquid(content)
|
||||
Liquid::Template.error_mode = :warn
|
||||
Liquid::Template.parse(content, :line_numbers => true).render(
|
||||
"author" => "John Doe",
|
||||
"title" => "FooBar"
|
||||
)
|
||||
end
|
||||
|
||||
# Mimic how the proposed change would first execute a couple of checks and
|
||||
# proceed to process with Liquid if necessary
|
||||
def conditional_liquid(content)
|
||||
return content if content.nil? || content.empty?
|
||||
return content unless content.include?("{%") || content.include?("{{")
|
||||
always_liquid(content)
|
||||
end
|
||||
|
||||
# Test https://github.com/jekyll/jekyll/pull/6735#discussion_r165499868
|
||||
# ------------------------------------------------------------------------
|
||||
def check_with_regex(content)
|
||||
!content.to_s.match?(%r!{[{%]!)
|
||||
end
|
||||
|
||||
def check_with_builtin(content)
|
||||
content.include?("{%") || content.include?("{{")
|
||||
end
|
||||
|
||||
SUITE.each do |key, text|
|
||||
Benchmark.ips do |x|
|
||||
x.report("regex-check - #{key}") { check_with_regex(text) }
|
||||
x.report("builtin-check - #{key}") { check_with_builtin(text) }
|
||||
x.compare!
|
||||
end
|
||||
end
|
||||
# ------------------------------------------------------------------------
|
||||
|
||||
# Let's roll!
|
||||
SUITE.each do |key, text|
|
||||
Benchmark.ips do |x|
|
||||
x.report("always thru liquid - #{key}") { always_liquid(text) }
|
||||
x.report("conditional liquid - #{key}") { conditional_liquid(text) }
|
||||
x.compare!
|
||||
end
|
||||
end
|
||||
29
benchmark/local-require
Executable file
29
benchmark/local-require
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'benchmark/ips'
|
||||
require 'jekyll'
|
||||
require 'json'
|
||||
|
||||
DATA = {"foo"=>"bar", "alpha"=>{"beta"=>"gamma"}, "lipsum"=>["lorem", "ipsum", "dolor"]}
|
||||
|
||||
def local_require
|
||||
require 'json'
|
||||
JSON.pretty_generate(DATA)
|
||||
end
|
||||
|
||||
def global_require
|
||||
JSON.pretty_generate(DATA)
|
||||
end
|
||||
|
||||
def graceful_require
|
||||
Jekyll::External.require_with_graceful_fail("json")
|
||||
JSON.pretty_generate(DATA)
|
||||
end
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report("local-require") { local_require }
|
||||
x.report("global-require") { global_require }
|
||||
x.report("graceful-require") { graceful_require }
|
||||
x.compare!
|
||||
end
|
||||
33
benchmark/native-vs-pathutil-relative
Executable file
33
benchmark/native-vs-pathutil-relative
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Benchmarking changes in https://github.com/jekyll/jekyll/pull/6767
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
require 'benchmark/ips'
|
||||
require 'pathutil'
|
||||
|
||||
DOC_PATH = File.join(File.expand_path(__dir__), "_puppies", "rover.md")
|
||||
COL_PATH = File.join(File.expand_path(__dir__), "_puppies")
|
||||
|
||||
|
||||
def pathutil_relative
|
||||
Pathutil.new(DOC_PATH).relative_path_from(COL_PATH).to_s
|
||||
end
|
||||
|
||||
def native_relative
|
||||
DOC_PATH.sub("#{COL_PATH}/", "")
|
||||
end
|
||||
|
||||
if pathutil_relative == native_relative
|
||||
Benchmark.ips do |x|
|
||||
x.report("pathutil") { pathutil_relative }
|
||||
x.report("native") { native_relative }
|
||||
x.compare!
|
||||
end
|
||||
else
|
||||
print "PATHUTIL: "
|
||||
puts pathutil_relative
|
||||
print "NATIVE: "
|
||||
puts native_relative
|
||||
end
|
||||
26
benchmark/sanitize-url.rb
Executable file
26
benchmark/sanitize-url.rb
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "benchmark/ips"
|
||||
|
||||
PATH = "/../../..../...//.....//lorem/ipsum//dolor///sit.xyz"
|
||||
|
||||
def sanitize_with_regex
|
||||
"/" + PATH.gsub(%r!/{2,}!, "/").gsub(%r!\.+/|\A/+!, "")
|
||||
end
|
||||
|
||||
def sanitize_with_builtin
|
||||
"/#{PATH}".gsub("..", "/").gsub("./", "").squeeze("/")
|
||||
end
|
||||
|
||||
if sanitize_with_regex == sanitize_with_builtin
|
||||
Benchmark.ips do |x|
|
||||
x.report("sanitize w/ regexes") { sanitize_with_regex }
|
||||
x.report("sanitize w/ builtin") { sanitize_with_builtin }
|
||||
x.compare!
|
||||
end
|
||||
else
|
||||
puts "w/ regexes: #{sanitize_with_regex}"
|
||||
puts "w/ builtin: #{sanitize_with_builtin}"
|
||||
puts ""
|
||||
puts "Thank you. Do try again :("
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
version: 3.7.2
|
||||
version: 3.8.3
|
||||
name: Jekyll • Simple, blog-aware, static sites
|
||||
description: Transform your plain text into static websites and blogs
|
||||
url: https://jekyllrb.com
|
||||
@@ -8,7 +8,6 @@ timezone: America/Los_Angeles
|
||||
twitter:
|
||||
username: jekyllrb
|
||||
logo: "/img/logo-2x.png"
|
||||
gauges_id: 503c5af6613f5d0f19000027
|
||||
google_analytics_id: UA-50755011-1
|
||||
google_site_verification: onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY
|
||||
collections:
|
||||
|
||||
15
docs/_data/sponsors.yml
Normal file
15
docs/_data/sponsors.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
- name: Forestry.io
|
||||
image: /img/forestry-logo.png
|
||||
url: https://forestry.io
|
||||
width: 140
|
||||
height: 30
|
||||
- name: CloudCannon
|
||||
image: /img/cloudcannon-logo.png
|
||||
url: https://cloudcannon.com
|
||||
width: 75
|
||||
height: 30
|
||||
- name: Siteleaf
|
||||
image: /img/siteleaf-logo.png
|
||||
url: https://siteleaf.com
|
||||
width: 40
|
||||
height: 50
|
||||
@@ -6,6 +6,7 @@
|
||||
- orderofinterpretation
|
||||
- custom-404-page
|
||||
- convert-site-to-jekyll
|
||||
- using-jekyll-with-bundler
|
||||
|
||||
#- title: Another section
|
||||
# tutorials:
|
||||
|
||||
@@ -53,7 +53,7 @@ sass:
|
||||
The Sass converter will default the `sass_dir` configuration option to
|
||||
`_sass`.
|
||||
|
||||
[example-sass]: https://github.com/jekyll/jekyll-sass-converter/tree/master/example
|
||||
[example-sass]: https://github.com/jekyll/jekyll-sass-converter/tree/master/docs
|
||||
|
||||
<div class="note info">
|
||||
<h5>The <code>sass_dir</code> is only used by Sass</h5>
|
||||
|
||||
@@ -56,9 +56,9 @@ defaults:
|
||||
</div>
|
||||
|
||||
<div class="note warning">
|
||||
<h5>Be sure to move posts into custom collections directory</h5>
|
||||
<h5>Be sure to move drafts and posts into custom collections directory</h5>
|
||||
|
||||
<p>If you specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code>, then you will need to move your <code>_posts</code> directory to <code>my_collections/_posts</code>. Note that, the name of your collections directory cannot start with an underscore (`_`).</p>
|
||||
<p>If you specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code>, then you will need to move your <code>_drafts</code> and <code>_posts</code> directory to <code>my_collections/_drafts</code> and <code>my_collections/_posts</code>. Note that, the name of your collections directory cannot start with an underscore (`_`).</p>
|
||||
</div>
|
||||
|
||||
### Step 2: Add your content {#step2}
|
||||
@@ -348,6 +348,20 @@ you specified in your `_config.yml` (if present) and the following information:
|
||||
<code>{% raw %}{{ site.collections | where: "label", "myCollection" | first }}{% endraw %}</code></p>
|
||||
</div>
|
||||
|
||||
<div class="note info">
|
||||
<h5>Collections and Time</h5>
|
||||
<p>Except for documents in hard-coded default collection <code>posts</code>, all documents in collections
|
||||
you create, are accessible via Liquid irrespective of their assigned date, if any, and therefore renderable.
|
||||
</p>
|
||||
<p>However documents are attempted to be written to disk only if the concerned collection
|
||||
metadata has <code>output: true</code>. Additionally, future-dated documents are only written if
|
||||
<code>site.future</code> <em>is also true</em>.
|
||||
</p>
|
||||
<p>More fine-grained control over documents being written to disk can be exercised by setting
|
||||
<code>published: false</code> (<em><code>true</code> by default</em>) in the document's front matter.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
### Documents
|
||||
|
||||
|
||||
@@ -642,12 +642,12 @@ collections:
|
||||
output: true
|
||||
|
||||
# Handling Reading
|
||||
safe: false
|
||||
include: [".htaccess"]
|
||||
exclude: ["Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
|
||||
keep_files: [".git", ".svn"]
|
||||
encoding: "utf-8"
|
||||
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
|
||||
safe: false
|
||||
include: [".htaccess"]
|
||||
exclude: ["Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
|
||||
keep_files: [".git", ".svn"]
|
||||
encoding: "utf-8"
|
||||
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
|
||||
strict_front_matter: false
|
||||
|
||||
# Filtering Content
|
||||
@@ -684,7 +684,9 @@ verbose: false
|
||||
defaults: []
|
||||
|
||||
liquid:
|
||||
error_mode: warn
|
||||
error_mode: warn
|
||||
strict_filters: false
|
||||
strict_variables: false
|
||||
|
||||
# Markdown Processors
|
||||
rdiscount:
|
||||
@@ -694,14 +696,14 @@ redcarpet:
|
||||
extensions: []
|
||||
|
||||
kramdown:
|
||||
auto_ids: true
|
||||
entity_output: as_char
|
||||
toc_levels: 1..6
|
||||
smart_quotes: lsquo,rsquo,ldquo,rdquo
|
||||
input: GFM
|
||||
hard_wrap: false
|
||||
footnote_nr: 1
|
||||
show_warnings: false
|
||||
auto_ids: true
|
||||
entity_output: as_char
|
||||
toc_levels: 1..6
|
||||
smart_quotes: lsquo,rsquo,ldquo,rdquo
|
||||
input: GFM
|
||||
hard_wrap: false
|
||||
footnote_nr: 1
|
||||
show_warnings: false
|
||||
```
|
||||
|
||||
## Liquid Options
|
||||
@@ -713,6 +715,14 @@ options are
|
||||
- `warn` --- Output a warning on the console for each error.
|
||||
- `strict` --- Output an error message and stop the build.
|
||||
|
||||
You can also configure Liquid's renderer to catch non-assigned variables and
|
||||
non-existing filters by setting `strict_variables` and / or `strict_filters`
|
||||
to `true` respectively. {% include docs_version_badge.html version="3.8.0" %}
|
||||
|
||||
Do note that while `error_mode` configures Liquid's parser, the `strict_variables`
|
||||
and `strict_filters` options configure Liquid's renderer and are consequently,
|
||||
mutually exclusive.
|
||||
|
||||
## Markdown Options
|
||||
|
||||
The various Markdown renderers supported by Jekyll sometimes have extra options
|
||||
|
||||
@@ -61,7 +61,7 @@ test:
|
||||
|
||||
## Complete Example circle.yml File
|
||||
|
||||
When you put it all together, here's an example of what that `circle.yml` file could look like:
|
||||
When you put it all together, here's an example of what that `circle.yml` file could look like in v1:
|
||||
|
||||
```yaml
|
||||
machine:
|
||||
@@ -83,6 +83,75 @@ deployment:
|
||||
- rsync -va --delete ./_site username@my-website:/var/html
|
||||
```
|
||||
|
||||
for CircleCI v2, a Docker-based system which new projects will follow, set the `S3_BUCKET_NAME` environment variable (an example of the required config file is shown below).
|
||||
|
||||
```yaml
|
||||
defaults: &defaults
|
||||
working_directory: ~/repo
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/ruby:2.5
|
||||
environment:
|
||||
BUNDLE_PATH: ~/repo/vendor/bundle
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
|
||||
- rubygems-v1-fallback
|
||||
- run:
|
||||
name: Bundle Install
|
||||
command: bundle check || bundle install
|
||||
- run:
|
||||
name: HTMLProofer tests
|
||||
command: |
|
||||
bundle exec htmlproofer ./_site \
|
||||
--allow-hash-href \
|
||||
--check-favicon \
|
||||
--check-html \
|
||||
--disable-external
|
||||
- save_cache:
|
||||
key: rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
|
||||
paths:
|
||||
- vendor/bundle
|
||||
- run:
|
||||
name: Jekyll build
|
||||
command: bundle exec jekyll build
|
||||
- persist_to_workspace:
|
||||
root: ./
|
||||
paths:
|
||||
- _site
|
||||
deploy:
|
||||
<<: *defaults
|
||||
docker:
|
||||
- image: circleci/python:3.6.3
|
||||
environment:
|
||||
S3_BUCKET_NAME: <<YOUR BUCKET NAME HERE>>
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ./
|
||||
- run:
|
||||
name: Install AWS CLI
|
||||
command: pip install awscli --upgrade --user
|
||||
- run:
|
||||
name: Upload to s3
|
||||
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --delete --acl public-read
|
||||
workflows:
|
||||
version: 2
|
||||
test-deploy:
|
||||
jobs:
|
||||
- build
|
||||
- deploy:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
```
|
||||
|
||||
## Questions?
|
||||
|
||||
This entire guide is open-source. Go ahead and [edit it][7] if you have a fix or [ask for help][8] if you run into trouble and need some help. CircleCI also has an [online community][9] for help.
|
||||
|
||||
@@ -76,7 +76,7 @@ with Ruby and requires RubyGems to install, we use the Ruby language build
|
||||
environment. Below is a sample `.travis.yml` file, followed by
|
||||
an explanation of each line.
|
||||
|
||||
**Note:** You will need a Gemfile as well, [Travis will automatically install](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems:
|
||||
**Note:** You will need a Gemfile as well, [Travis will automatically install](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems. Here is an example `Gemfile` with two referenced gems, "jekyll" and "html-proofer":
|
||||
|
||||
```ruby
|
||||
source "https://rubygems.org"
|
||||
@@ -90,7 +90,7 @@ Your `.travis.yml` file should look like this:
|
||||
```yaml
|
||||
language: ruby
|
||||
rvm:
|
||||
- 2.3.3
|
||||
- 2.4.1
|
||||
|
||||
before_script:
|
||||
- chmod +x ./script/cibuild # or do this locally and commit
|
||||
@@ -110,6 +110,12 @@ env:
|
||||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
|
||||
|
||||
sudo: false # route your build to the container-based infrastructure for a faster build
|
||||
|
||||
cache: bundler # caching bundler gem packages will speed up build
|
||||
|
||||
# Optional: disable email notifications about the outcome of your builds
|
||||
notifications:
|
||||
email: false
|
||||
```
|
||||
|
||||
Ok, now for an explanation of each line:
|
||||
@@ -123,12 +129,13 @@ access to Bundler, RubyGems, and a Ruby runtime.
|
||||
|
||||
```yaml
|
||||
rvm:
|
||||
- 2.3.3
|
||||
- 2.4.1
|
||||
```
|
||||
|
||||
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
|
||||
directive tells Travis the Ruby version to use when running your test
|
||||
script.
|
||||
script. Use a [version which is pre-installed on the Travis build docker][5]
|
||||
image to speed up the build.
|
||||
|
||||
```yaml
|
||||
before_script:
|
||||
@@ -210,6 +217,23 @@ does need `sudo` access, modify the line to `sudo: required`.
|
||||
sudo: false
|
||||
```
|
||||
|
||||
To speed up the build, you should cache the gem packages created by `bundler`.
|
||||
Travis has a pre-defined [cache strategy for this tool][6] which should have
|
||||
all the default configs to do exactly that.
|
||||
|
||||
```yaml
|
||||
cache: bundler
|
||||
```
|
||||
|
||||
Optionally, if you are not interested in the build email notifications you
|
||||
can disable them with this configuration. Travis supports a wide array of
|
||||
notification services, you may find [another one more useful (e.g. slack)][7].
|
||||
|
||||
```yaml
|
||||
notifications:
|
||||
email: false
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Travis error:** *"You are trying to install in deployment mode after changing
|
||||
@@ -227,3 +251,6 @@ fix or [ask for help][4] if you run into trouble and need some help.
|
||||
|
||||
[3]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/travis-ci.md
|
||||
[4]: https://jekyllrb.com/help/
|
||||
[5]: https://docs.travis-ci.com/user/languages/ruby/#Specifying-Ruby-versions-and-implementations
|
||||
[6]: https://docs.travis-ci.com/user/caching/#Caching-directories-(Bundler%2C-dependencies)
|
||||
[7]: https://docs.travis-ci.com/user/notifications/
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Working with drafts
|
||||
permalink: /docs/drafts/
|
||||
---
|
||||
|
||||
Drafts are posts without a date. They're posts you're still working on and
|
||||
Drafts are posts without a date in the filename. They're posts you're still working on and
|
||||
don't want to publish yet. To get up and running with drafts, create a
|
||||
`_drafts` folder in your site's root (as described in the [site structure](/docs/structure/) section) and create your
|
||||
first draft:
|
||||
|
||||
@@ -4,6 +4,148 @@ permalink: "/docs/history/"
|
||||
note: This file is autogenerated. Edit /History.markdown instead.
|
||||
---
|
||||
|
||||
## 3.8.3 / 2018-06-05
|
||||
{: #v3-8-3}
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-8-3}
|
||||
|
||||
- Fix --unpublished not affecting collection documents ([#7027]({{ site.repository }}/issues/7027))
|
||||
|
||||
|
||||
## 3.8.2 / 2018-05-18
|
||||
{: #v3-8-2}
|
||||
|
||||
### Development Fixes
|
||||
{: #development-fixes-v3-8-2}
|
||||
|
||||
- Update rubocop version ([#7016]({{ site.repository }}/issues/7016))
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-8-2}
|
||||
|
||||
- Add whitespace control to LIQUID_TAG_REGEX ([#7015]({{ site.repository }}/issues/7015))
|
||||
|
||||
|
||||
## 3.8.1 / 2018-05-01
|
||||
{: #v3-8-1}
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-8-1}
|
||||
|
||||
- Fix rendering Liquid constructs in excerpts ([#6945]({{ site.repository }}/issues/6945))
|
||||
- Liquify documents unless published == false ([#6959]({{ site.repository }}/issues/6959))
|
||||
|
||||
|
||||
## 3.8.0 / 2018-04-19
|
||||
{: #v3-8-0}
|
||||
|
||||
### Development Fixes
|
||||
{: #development-fixes-v3-8-0}
|
||||
|
||||
- move duplicate code to a single private method ([#6593]({{ site.repository }}/issues/6593))
|
||||
- Test against Ruby 2.5 on AppVeyor ([#6668]({{ site.repository }}/issues/6668))
|
||||
- Replace simple regex with a native Ruby method ([#6732]({{ site.repository }}/issues/6732))
|
||||
- Codeclimate: exclude livereload.js ([#6776]({{ site.repository }}/issues/6776))
|
||||
- Add a cucumber feature to test link tag ([#6777]({{ site.repository }}/issues/6777))
|
||||
- Fix theme gem feature ([#6784]({{ site.repository }}/issues/6784))
|
||||
- Replace simple regex with equivalent Ruby methods ([#6736]({{ site.repository }}/issues/6736))
|
||||
- Rewrite `script/rubyprof` as a Ruby script ([#6813]({{ site.repository }}/issues/6813))
|
||||
- Add debug output to theme rendering ([#5195]({{ site.repository }}/issues/5195))
|
||||
- fix minitest deprecation warning in test ([#6839]({{ site.repository }}/issues/6839))
|
||||
- Memoize `Site#site_data` ([#6809]({{ site.repository }}/issues/6809))
|
||||
- Memoize document output extension ([#6814]({{ site.repository }}/issues/6814))
|
||||
- Access document permalink attribute efficiently ([#6740]({{ site.repository }}/issues/6740))
|
||||
- Minimize array allocations in the `where` filter ([#6860]({{ site.repository }}/issues/6860))
|
||||
- Bump JRuby ([#6878]({{ site.repository }}/issues/6878))
|
||||
- Assert existence of <collection>.files ([#6907]({{ site.repository }}/issues/6907))
|
||||
- Bump Rubocop to 0.54.x ([#6915]({{ site.repository }}/issues/6915))
|
||||
- Regenerate unconditionally unless its an incremental build ([#6917]({{ site.repository }}/issues/6917))
|
||||
- Centralize require statements ([#6910]({{ site.repository }}/issues/6910))
|
||||
- Bump to Rubocop 0.55 ([#6929]({{ site.repository }}/issues/6929))
|
||||
- Refactor private method `HighlightBlock#parse_options` ([#6822]({{ site.repository }}/issues/6822))
|
||||
|
||||
### Minor Enhancements
|
||||
{: #minor-enhancements-v3-8-0}
|
||||
|
||||
- Two massive performance improvements for large sites ([#6730]({{ site.repository }}/issues/6730))
|
||||
- Cache the list of documents to be written ([#6741]({{ site.repository }}/issues/6741))
|
||||
- Allow Jekyll Doctor to detect stray posts dir ([#6681]({{ site.repository }}/issues/6681))
|
||||
- Excerpt relative-path should match its path ([#6597]({{ site.repository }}/issues/6597))
|
||||
- Remind user to resolve conflict in `jekyll new` with `--force` ([#6801]({{ site.repository }}/issues/6801))
|
||||
- Memoize helper methods in site-cleaner ([#6808]({{ site.repository }}/issues/6808))
|
||||
- Compute document's relative_path faster ([#6767]({{ site.repository }}/issues/6767))
|
||||
- Create a single instance of PostReader per site ([#6759]({{ site.repository }}/issues/6759))
|
||||
- Allow date filters to output ordinal days ([#6773]({{ site.repository }}/issues/6773))
|
||||
- Change regex to sanitize and normalize filenames passed to LiquidRenderer ([#6610]({{ site.repository }}/issues/6610))
|
||||
- Allow passing :strict_variables and :strict_filters options to Liquid's renderer ([#6726]({{ site.repository }}/issues/6726))
|
||||
- Debug writing files during the build process ([#6696]({{ site.repository }}/issues/6696))
|
||||
- Improve regex usage in `Tags::IncludeTag` ([#6848]({{ site.repository }}/issues/6848))
|
||||
- Improve comment included in the starter index.md ([#6916]({{ site.repository }}/issues/6916))
|
||||
- Store and retrieve converter instances for Jekyll::Filters via a hash ([#6856]({{ site.repository }}/issues/6856))
|
||||
- Implement a cache within the `where` filter ([#6868]({{ site.repository }}/issues/6868))
|
||||
- Store regexp in a constant ([#6887]({{ site.repository }}/issues/6887))
|
||||
- Optimize computing filename in LiquidRenderer ([#6841]({{ site.repository }}/issues/6841))
|
||||
|
||||
### Documentation
|
||||
|
||||
- Adding the jekyll-algolia plugin to the list of plugins ([#6737]({{ site.repository }}/issues/6737))
|
||||
- Added Premonition plugin to list of plugins ([#6750]({{ site.repository }}/issues/6750))
|
||||
- Add document on releasing a new version ([#6745]({{ site.repository }}/issues/6745))
|
||||
- Mention Talkyard, a new commenting system for Jekyll and others. ([#6752]({{ site.repository }}/issues/6752))
|
||||
- Add 'jekyll-fontello' to plugins ([#6757]({{ site.repository }}/issues/6757))
|
||||
- Install dh-autoreconf on Windows ([#6765]({{ site.repository }}/issues/6765))
|
||||
- Fix common typos ([#6764]({{ site.repository }}/issues/6764))
|
||||
- Fix documentation for {% raw %}`{{ page.excerpt }}`{% endraw %} ([#6779]({{ site.repository }}/issues/6779))
|
||||
- Update docs on permalink configuration ([#6775]({{ site.repository }}/issues/6775))
|
||||
- Propose fix some typos ([#6785]({{ site.repository }}/issues/6785))
|
||||
- Say hello to Jekyll's New Lead Developer ([#6790]({{ site.repository }}/issues/6790))
|
||||
- Add reference to Liquid to plugin docs ([#6794]({{ site.repository }}/issues/6794))
|
||||
- Draft a release post for v3.7.3 ([#6803]({{ site.repository }}/issues/6803))
|
||||
- add missing step for gem-based theme conversion ([#6802]({{ site.repository }}/issues/6802))
|
||||
- Update windows.md to explain an issue with jekyll new. ([#6838]({{ site.repository }}/issues/6838))
|
||||
- Add Bundler Installation Instructions ([#6828]({{ site.repository }}/issues/6828))
|
||||
- Docs: describe difference between tags and categories ([#6882]({{ site.repository }}/issues/6882))
|
||||
- Add `jekyll-random` plugin to docs ([#6833]({{ site.repository }}/issues/6833))
|
||||
- Fixed typo in description of categories and tags ([#6896]({{ site.repository }}/issues/6896))
|
||||
- Add missing ul-tag ([#6897]({{ site.repository }}/issues/6897))
|
||||
- doc: add liquid tag plugin jekyll-onebox for html previews ([#6898]({{ site.repository }}/issues/6898))
|
||||
- Add `jekyll-w2m` to plugins ([#6855]({{ site.repository }}/issues/6855))
|
||||
- Fix tutorials navigation HTML ([#6919]({{ site.repository }}/issues/6919))
|
||||
- add Arch Linux instalation troubleshoot ([#6782]({{ site.repository }}/issues/6782))
|
||||
- Docs: Install Jekyll on macOS ([#6881]({{ site.repository }}/issues/6881))
|
||||
- Fix CodeClimate badges [ci skip] ([#6930]({{ site.repository }}/issues/6930))
|
||||
- Update index.md ([#6933]({{ site.repository }}/issues/6933))
|
||||
|
||||
### Site Enhancements
|
||||
{: #site-enhancements-v3-8-0}
|
||||
|
||||
- Remove links to Gists ([#6751]({{ site.repository }}/issues/6751))
|
||||
- Always load Google Fonts over HTTPS ([#6792]({{ site.repository }}/issues/6792))
|
||||
- always load analytics.js over HTTPS ([#6807]({{ site.repository }}/issues/6807))
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-8-0}
|
||||
|
||||
- Append appropriate closing tag to Liquid block in an excerpt ### -minor ([#6724]({{ site.repository }}/issues/6724))
|
||||
- Bypass rendering via Liquid unless required ([#6735]({{ site.repository }}/issues/6735))
|
||||
- Delegated methods after `private` keyword are meant to be private ([#6819]({{ site.repository }}/issues/6819))
|
||||
- Improve handling non-default collection documents rendering and writing ([#6795]({{ site.repository }}/issues/6795))
|
||||
- Fix passing multiline params to include tag when using the variable syntax ([#6858]({{ site.repository }}/issues/6858))
|
||||
- `include_relative` tag should find related documents in collections gathered within custom `collections_dir` ([#6818]({{ site.repository }}/issues/6818))
|
||||
- Handle liquid tags in excerpts robustly ([#6891]({{ site.repository }}/issues/6891))
|
||||
- Allow front matter defaults to be applied properly to documents gathered under custom `collections_dir` ([#6885]({{ site.repository }}/issues/6885))
|
||||
|
||||
|
||||
## 3.7.3 / 2018-02-25
|
||||
{: #v3-7-3}
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-7-3}
|
||||
|
||||
- Do not hardcode locale unless certainly necessary ([#6791]({{ site.repository }}/issues/6791))
|
||||
|
||||
|
||||
## 3.7.2 / 2018-01-25
|
||||
{: #v3-7-2}
|
||||
|
||||
@@ -38,7 +180,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
|
||||
- inform that symlinks are not allowed in safe mode ([#6670]({{ site.repository }}/issues/6670))
|
||||
- Glob scope path only if configured with a pattern ([#6692]({{ site.repository }}/issues/6692))
|
||||
- Add gem "wdm" to all newly generated Gemfiles ([#6711]({{ site.repository }}/issues/6711))
|
||||
- Fix timezone incosistencies between different ruby version ([#6697]({{ site.repository }}/issues/6697))
|
||||
- Fix timezone inconsistencies between different ruby version ([#6697]({{ site.repository }}/issues/6697))
|
||||
- Refactor collections_dir feature for consistency ([#6685]({{ site.repository }}/issues/6685))
|
||||
|
||||
### Minor Enhancements
|
||||
@@ -145,7 +287,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
|
||||
- Add jekyll-pwa-plugin ([#6533]({{ site.repository }}/issues/6533))
|
||||
- Remove Jekyll-Smartify from plugins directory ([#6548]({{ site.repository }}/issues/6548))
|
||||
- Updated Jekyll-Pug listing to include official website ([#6555]({{ site.repository }}/issues/6555))
|
||||
- Remove link to severly outdated asset plugin ([#6613]({{ site.repository }}/issues/6613))
|
||||
- Remove link to severely outdated asset plugin ([#6613]({{ site.repository }}/issues/6613))
|
||||
- Default time zone depends upon server ([#6617]({{ site.repository }}/issues/6617))
|
||||
- Add `disqus-for-jekyll` to plugins. ([#6618]({{ site.repository }}/issues/6618))
|
||||
- Update "Requirements" for Ruby version ([#6623]({{ site.repository }}/issues/6623))
|
||||
@@ -778,9 +920,9 @@ note: This file is autogenerated. Edit /History.markdown instead.
|
||||
- Update appveyor.yml and fix optional deps for Ruby x64 ([#5180]({{ site.repository }}/issues/5180))
|
||||
- Improve tests for Jekyll::PluginManager ([#5167]({{ site.repository }}/issues/5167))
|
||||
- Update Ruby versions in travis.yml ([#5221]({{ site.repository }}/issues/5221))
|
||||
- Avoid installing unecessary gems for site testing ([#5272]({{ site.repository }}/issues/5272))
|
||||
- Avoid installing unnecessary gems for site testing ([#5272]({{ site.repository }}/issues/5272))
|
||||
- Proposal: Affinity teams and their captains ([#5273]({{ site.repository }}/issues/5273))
|
||||
- Replace duplicate with postive local test in issue template ([#5286]({{ site.repository }}/issues/5286))
|
||||
- Replace duplicate with positive local test in issue template ([#5286]({{ site.repository }}/issues/5286))
|
||||
- Update AppVeyor config. ([#5240]({{ site.repository }}/issues/5240))
|
||||
- Execute jekyll from clone instead of defined binary when running 'script/default-site' ([#5295]({{ site.repository }}/issues/5295))
|
||||
- rubocop: lib/jekyll/document.rb complexity fixes ([#5045]({{ site.repository }}/issues/5045))
|
||||
@@ -832,7 +974,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
|
||||
- Allow collections to have documents that have no file extension ([#4545]({{ site.repository }}/issues/4545))
|
||||
- Add size property to `group_by` result ([#4557]({{ site.repository }}/issues/4557))
|
||||
- Site Template: Removed unnecessary nesting from `_base.scss` ([#4637]({{ site.repository }}/issues/4637))
|
||||
- Adding a debug log statment for skipped future documents. ([#4558]({{ site.repository }}/issues/4558))
|
||||
- Adding a debug log statement for skipped future documents. ([#4558]({{ site.repository }}/issues/4558))
|
||||
- Site Template: Changed main `<div>` to `<main>` and added accessibility info ([#4636]({{ site.repository }}/issues/4636))
|
||||
- Add array support to `where` filter ([#4555]({{ site.repository }}/issues/4555))
|
||||
- 'jekyll clean': also remove .sass-cache ([#4652]({{ site.repository }}/issues/4652))
|
||||
@@ -1170,7 +1312,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
|
||||
- utils/drops: update Drop to support `Utils.deep_merge_hashes` ([#4289]({{ site.repository }}/issues/4289))
|
||||
- Make sure jekyll/drops/drop is loaded first. ([#4292]({{ site.repository }}/issues/4292))
|
||||
- Convertible/Page/Renderer: use payload hash accessor & setter syntax for backwards-compatibility ([#4311]({{ site.repository }}/issues/4311))
|
||||
- Drop: fix hash setter precendence ([#4312]({{ site.repository }}/issues/4312))
|
||||
- Drop: fix hash setter precedence ([#4312]({{ site.repository }}/issues/4312))
|
||||
- utils: `has_yaml_header?` should accept files with extraneous spaces ([#4290]({{ site.repository }}/issues/4290))
|
||||
- Escape html from site.title and page.title in site template ([#4307]({{ site.repository }}/issues/4307))
|
||||
- Allow custom file extensions if defined in `permalink` YAML front matter ([#4314]({{ site.repository }}/issues/4314))
|
||||
|
||||
@@ -86,6 +86,7 @@ For example, suppose you have a special image syntax with complex formatting, an
|
||||
<a href="http://jekyllrb.com">
|
||||
<img src="logo.png" style="max-width: 200px;"
|
||||
alt="Jekyll logo" />
|
||||
</a>
|
||||
<figcaption>This is the Jekyll logo</figcaption>
|
||||
</figure>
|
||||
```
|
||||
@@ -98,6 +99,7 @@ You could templatize this content in your include and make each value available
|
||||
<a href="{{ include.url }}">
|
||||
<img src="{{ include.file }}" style="max-width: {{ include.max-width }};"
|
||||
alt="{{ include.alt }}"/>
|
||||
</a>
|
||||
<figcaption>{{ include.caption }}</figcaption>
|
||||
</figure>
|
||||
```
|
||||
|
||||
@@ -4,53 +4,38 @@ permalink: /docs/home/
|
||||
redirect_from: /docs/index.html
|
||||
---
|
||||
|
||||
This site aims to be a comprehensive guide to Jekyll. We’ll cover topics such
|
||||
as getting your site up and running, creating and managing your content,
|
||||
customizing the way your site works and looks, deploying to various
|
||||
environments, and give you some advice on participating in the future
|
||||
development of Jekyll itself.
|
||||
This site aims to be a comprehensive guide to Jekyll. We’ll cover topics such as getting your site up and running, creating and managing content, customizing your build, and deploying.
|
||||
|
||||
## So what is Jekyll, exactly?
|
||||
## What is Jekyll, exactly?
|
||||
|
||||
Jekyll is a simple, blog-aware, static site generator. It takes a template
|
||||
directory containing raw text files in various formats, runs it through
|
||||
a converter (like [Markdown](https://daringfireball.net/projects/markdown/))
|
||||
and our [Liquid](https://shopify.github.io/liquid/) renderer, and
|
||||
spits out a complete, ready-to-publish static website suitable
|
||||
for serving with your favorite web server. Jekyll also happens to be the engine
|
||||
behind [GitHub Pages](https://pages.github.com), which means you can use Jekyll
|
||||
to host your project’s page, blog, or website from GitHub’s servers **for
|
||||
free**.
|
||||
Jekyll is a simple, blog-aware, static site generator.
|
||||
|
||||
## Helpful Hints
|
||||
You create your content as text files ([Markdown](https://daringfireball.net/projects/markdown/)), and organize them into folders. Then, you build the shell of your site using [Liquid](https://shopify.github.io/liquid/)-enhanced HTML templates. Jekyll automatically stitches the content and templates together, generating a website made entirely of static assets, suitable for uploading to any server.
|
||||
|
||||
Throughout this guide there are a number of small-but-handy pieces of
|
||||
information that can make using Jekyll easier, more interesting, and less
|
||||
hazardous. Here’s what to look out for.
|
||||
Jekyll happens to be the engine behind [GitHub Pages](https://pages.github.com), so you can host your project’s Jekyll page/blog/website on GitHub’s servers **for free**.
|
||||
|
||||
## Navigating the Guide
|
||||
|
||||
Throughout this guide, you'll see these special sections that help you get the most out of Jekyll:
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTips™ help you get more from Jekyll</h5>
|
||||
<p>These are tips and tricks that will help you be a Jekyll wizard!</p>
|
||||
<h5>ProTips™</h5>
|
||||
<p>Tips and tricks that'll make you a Jekyll wizard!</p>
|
||||
</div>
|
||||
|
||||
<div class="note info">
|
||||
<h5>Notes are handy pieces of information</h5>
|
||||
<p>These are for the extra tidbits sometimes necessary to understand
|
||||
Jekyll.</p>
|
||||
<h5>Notes</h5>
|
||||
<p>Extra tidbits that are sometimes necessary to understand Jekyll.</p>
|
||||
</div>
|
||||
|
||||
<div class="note warning">
|
||||
<h5>Warnings help you not blow things up</h5>
|
||||
<p>Be aware of these messages if you wish to avoid certain death.</p>
|
||||
<h5>Warnings</h5>
|
||||
<p>Common pitfalls to avoid.</p>
|
||||
</div>
|
||||
|
||||
<div class="note unreleased">
|
||||
<h5>You'll see this by a feature that hasn't been released</h5>
|
||||
<p>Some pieces of this website are for future versions of Jekyll that
|
||||
are not yet released.</p>
|
||||
<h5>Unreleased</h5>
|
||||
<p>Features planned for future versions of Jekyll, but not available yet.</p>
|
||||
</div>
|
||||
|
||||
If you come across anything along the way that we haven’t covered, or if you
|
||||
know of a tip you think others would find handy, please [file an
|
||||
issue]({{ site.repository }}/issues/new) and we’ll see about
|
||||
including it in this guide.
|
||||
If you find anything we haven’t covered, or would like to share a tip that others might find handy, please [file an issue]({{ site.repository }}/issues/new) and we’ll see about adding it to the guide.
|
||||
|
||||
@@ -1,65 +1,176 @@
|
||||
---
|
||||
title: Installation
|
||||
description: Official guide to install Jekyll on macOS, GNU/Linux or Windows.
|
||||
permalink: /docs/installation/
|
||||
---
|
||||
|
||||
Getting Jekyll installed and ready-to-go should only take a few minutes.
|
||||
If it ever becomes a pain, please [file an issue]({{ site.repository }}/issues/new)
|
||||
(or submit a pull request) describing the issue you
|
||||
encountered and how we might make the process easier.
|
||||
Jekyll is a [Ruby Gem](http://guides.rubygems.org/rubygems-basics/), and can be
|
||||
installed on most systems.
|
||||
|
||||
### Requirements
|
||||
- [Requirements](#requirements)
|
||||
- [Install Jekyll on macOS](#macOS)
|
||||
- [Install Jekyll on Ubuntu Linux](#ubuntu)
|
||||
- [Install Jekyll on Windows](../windows/)
|
||||
- [Upgrade Jekyll](#upgrade-jekyll)
|
||||
|
||||
## Requirements
|
||||
|
||||
Installing Jekyll should be straight-forward if all requirements are met.
|
||||
Before you start, make sure your system has the following:
|
||||
|
||||
- GNU/Linux, Unix, or macOS
|
||||
- [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.2.5 or above, including all development
|
||||
headers (ruby installation can be checked by running `ruby -v`, development headers can be checked on Ubuntu by running `apt list --installed ruby-dev`)
|
||||
- [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.2.5 or above, including all development headers (ruby installation can be checked by running `ruby -v`)
|
||||
- [RubyGems](https://rubygems.org/pages/download) (which you can check by running `gem -v`)
|
||||
- [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (in case your system doesn't have them installed, which you can check by running `gcc -v`,`g++ -v` and `make -v` in your system's command line interface)
|
||||
|
||||
<div class="note info">
|
||||
<h5>Problems installing Jekyll?</h5>
|
||||
<p>
|
||||
Check out the <a href="../troubleshooting/">troubleshooting</a> page or
|
||||
<a href="{{ site.repository }}/issues/new">report an issue</a> so the
|
||||
Jekyll community can improve the experience for everyone.
|
||||
</p>
|
||||
</div>
|
||||
## Install on macOS {#macOS}
|
||||
|
||||
<div class="note info">
|
||||
<h5>Running Jekyll on Windows</h5>
|
||||
<p>
|
||||
While Windows is not officially supported, it is possible to get Jekyll running
|
||||
on Windows. Special instructions can be found on our
|
||||
<a href="../windows/#installation">Windows-specific docs page</a>.
|
||||
</p>
|
||||
</div>
|
||||
We only cover macOS High Sierra 10.13 here, which comes with Ruby 2.3.3, older systems will need to [install a more recent Ruby version via Homebrew](#homebrew).
|
||||
|
||||
## Install with RubyGems
|
||||
|
||||
The best way to install Jekyll is via
|
||||
[RubyGems](https://rubygems.org/pages/download). At the terminal prompt,
|
||||
simply run the following command to install Jekyll:
|
||||
First, you need to install the command-line tools to be able to compile native extensions, open a terminal and run:
|
||||
|
||||
```sh
|
||||
gem install jekyll
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
All of Jekyll’s gem dependencies are automatically installed by the above
|
||||
command, so you won’t have to worry about them at all.
|
||||
### Set up Ruby included with the OS
|
||||
|
||||
Check your Ruby version meet our requirements:
|
||||
|
||||
```sh
|
||||
ruby -v
|
||||
2.3.3
|
||||
```
|
||||
|
||||
Great, let's install Jekyll. We also need [Bundler](https://bundler.io/) to help us handle [plugins](../plugins) and [themes](../themes):
|
||||
|
||||
```sh
|
||||
gem install bundler jekyll
|
||||
```
|
||||
|
||||
That's it, you're ready to go, either by installing our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website` or by starting from scratch:
|
||||
|
||||
```sh
|
||||
mkdir jekyll-website
|
||||
cd jekyll-website
|
||||
|
||||
# Create a Gemfile
|
||||
bundle init
|
||||
|
||||
# Add Jekyll
|
||||
bundle add jekyll
|
||||
|
||||
# Install gems
|
||||
bundle install
|
||||
```
|
||||
|
||||
Great, from there you can now either use a [theme](../themes/) or [create your own layouts](../templates/).
|
||||
|
||||
### Install a newer Ruby version via Homebrew {#homebrew}
|
||||
|
||||
If you wish to install the latest version of Ruby and get faster builds, we recommend to do it via [Homebrew](https://brew.sh) a handy package manager for macOS.
|
||||
|
||||
```sh
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
brew install ruby
|
||||
ruby -v
|
||||
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
|
||||
```
|
||||
|
||||
Yay! Now you have a shiny Ruby on your system!
|
||||
|
||||
### Install multiple Ruby versions with rbenv {#rbenv}
|
||||
|
||||
Developers often use [rbenv](https://github.com/rbenv/rbenv) to manage multiple Ruby versions. This can be useful if you want to run the same Ruby version used by [GitHub Pages](https://pages.github.com/versions/) or [Netlify](https://www.netlify.com/docs/#ruby) for instance.
|
||||
|
||||
```sh
|
||||
# Install rbenv and ruby-build
|
||||
brew install rbenv
|
||||
|
||||
# Setup rbenv integration to your shell
|
||||
rbenv init
|
||||
|
||||
# Check your install
|
||||
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
|
||||
```
|
||||
|
||||
Restart your terminal for changes to take effect.
|
||||
Now we can install the Ruby version of our choice, let's go with Ruby 2.5.1 here:
|
||||
|
||||
```sh
|
||||
rbenv install 2.5.1
|
||||
rbenv global 2.5.1
|
||||
ruby -v
|
||||
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
|
||||
```
|
||||
|
||||
That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects.
|
||||
|
||||
<div class="note info" markdown="1">
|
||||
|
||||
##### Problems installing Jekyll?
|
||||
|
||||
Check out the [troubleshooting](../troubleshooting/) page or
|
||||
[ask for help on our forum](https://talk.jekyllrb.com).
|
||||
|
||||
<div class="note info">
|
||||
<h5>Installing Xcode Command-Line Tools</h5>
|
||||
<p>
|
||||
If you run into issues installing Jekyll's dependencies which make use of
|
||||
native extensions and are using macOS, you will need to install Xcode
|
||||
and the Command-Line Tools it ships with. Download them in
|
||||
<code>Preferences → Downloads → Components</code>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Install on Ubuntu Linux {#ubuntu}
|
||||
|
||||
Before we install Jekyll, we need to make sure we have all the required
|
||||
dependencies.
|
||||
|
||||
```sh
|
||||
sudo apt-get install ruby ruby-dev build-essential
|
||||
```
|
||||
|
||||
It is best to avoid installing Ruby Gems as the root user. Therefore, we need to
|
||||
set up a gem installation directory for your user account. The following
|
||||
commands will add environment variables to your `~/.bashrc` file to configure
|
||||
the gem installation path. Run them now:
|
||||
|
||||
```sh
|
||||
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
|
||||
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
|
||||
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Finally, install Jekyll:
|
||||
|
||||
```sh
|
||||
gem install jekyll bundler
|
||||
```
|
||||
|
||||
That's it! You're ready to start using Jekyll.
|
||||
|
||||
## Upgrade Jekyll
|
||||
|
||||
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find the currently installed version of Jekyll, run one of these commands:
|
||||
|
||||
```sh
|
||||
jekyll --version
|
||||
gem list jekyll
|
||||
```
|
||||
|
||||
You can use RubyGems to find [the current version of Jekyll](https://rubygems.org/gems/jekyll). Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
|
||||
|
||||
```sh
|
||||
bundle update jekyll
|
||||
```
|
||||
|
||||
Alternatively, if you don't have Bundler installed run:
|
||||
|
||||
```sh
|
||||
gem update jekyll
|
||||
```
|
||||
|
||||
To upgrade to latest Rubygems, run:
|
||||
|
||||
```
|
||||
gem update --system
|
||||
```
|
||||
|
||||
Refer to our [upgrading section](../upgrading/) to upgrade from Jekyll 2.x or 1.x.
|
||||
|
||||
## Pre-releases
|
||||
|
||||
In order to install a pre-release, make sure you have all the requirements
|
||||
@@ -88,52 +199,4 @@ bundle exec rake build
|
||||
ls pkg/*.gem | head -n 1 | xargs gem install -l
|
||||
```
|
||||
|
||||
## Optional Extras
|
||||
|
||||
There are a number of (optional) extra features that Jekyll supports that you
|
||||
may want to install, depending on how you plan to use Jekyll. These extras
|
||||
include LaTeX support, and the use of alternative content rendering engines.
|
||||
Check out [the extras page](../extras/) for more information.
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTip™: Enable Syntax Highlighting</h5>
|
||||
<p>
|
||||
If you’re the kind of person who is using Jekyll, then chances are you’ll
|
||||
want to enable syntax highlighting using <a href="http://pygments.org/">Pygments</a>
|
||||
or <a href="https://github.com/jayferd/rouge">Rouge</a>. You should really
|
||||
<a href="../templates/#code-snippet-highlighting">check out how to
|
||||
do that</a> before you go any farther.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Already Have Jekyll?
|
||||
|
||||
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find your version of Jekyll, run one of these commands:
|
||||
|
||||
```sh
|
||||
jekyll --version
|
||||
gem list jekyll
|
||||
```
|
||||
|
||||
You can also use [RubyGems](https://rubygems.org/gems/jekyll) to find the current versioning of any gem. But you can also use the `gem` command line tool:
|
||||
|
||||
```sh
|
||||
gem search jekyll --remote
|
||||
```
|
||||
|
||||
and you'll search for just the name `jekyll`, and in brackets will be latest version. Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
|
||||
|
||||
```sh
|
||||
bundle update jekyll
|
||||
```
|
||||
|
||||
Alternatively, if you don't have Bundler installed run:
|
||||
|
||||
```sh
|
||||
gem update jekyll
|
||||
```
|
||||
|
||||
Please refer to our [upgrading section](../upgrading/) for major updates
|
||||
detailed instructions.
|
||||
|
||||
Now that you’ve got everything up-to-date and installed, let’s get to work!
|
||||
|
||||
@@ -7,11 +7,11 @@ title: "Avoiding Burnout"
|
||||
|
||||
# 1. Use Jekyll
|
||||
|
||||
Maintainers of Jekyll should be using it regularly. This is partly because you won't be a good maintainer unless you can put yourself in the shoes of our users but also because you may decide to stop using Jekyll and at that point you should also decide not to be a maintainer and find other things to work on.
|
||||
Maintainers of Jekyll should be using it regularly. This is partly because you won't be a good maintainer unless you can put yourself in the shoes of our users, but also because you may at some point decide to stop using Jekyll, and at that point you should also decide to stop being a maintainer and find other things to work on.
|
||||
|
||||
# 2. No Guilt About Leaving
|
||||
|
||||
All maintainers can stop working on Jekyll at any time without any guilt or explanation (like a job). We may still ask for your help with questions after you leave but you are under no obligation to answer them. Like a job, if you create a big mess and then leave you still have no obligations but we may think less of you (or, realistically, probably just revert the problematic work). Like a job, you should probably take a break from Jekyll at least a few times a year.
|
||||
All maintainers can stop working on Jekyll at any time without any guilt or explanation (like at a job). We may still ask for your help with questions after you leave but you are under no obligation to answer them. If you create a big mess and then leave you still have no obligations but we may think less of you (or, realistically, probably just revert the problematic work). Also, you should probably take a break from Jekyll at least a few times a year.
|
||||
|
||||
This also means contributors should be consumers. If a maintainer finds they are not using a project in the real-world, they should reconsider their involvement with the project.
|
||||
|
||||
|
||||
@@ -8,13 +8,14 @@ permalink: /docs/maintaining/
|
||||
|
||||
Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer.
|
||||
|
||||
1. [Affinity teams & their captains](affinity-team-captain/)
|
||||
2. [Triaging and issue](triaging-an-issue/)
|
||||
3. [Reviewing a pull request](reviewing-a-pull-request/)
|
||||
4. [Merging a pull request](merging-a-pull-request/)
|
||||
5. [Avoiding burnout](avoiding-burnout/)
|
||||
6. [Special Labels](special-labels/)
|
||||
- [Affinity teams & their captains](affinity-team-captain/)
|
||||
- [Triaging an issue](triaging-an-issue/)
|
||||
- [Reviewing a pull request](reviewing-a-pull-request/)
|
||||
- [Merging a pull request](merging-a-pull-request/)
|
||||
- [Avoiding burnout](avoiding-burnout/)
|
||||
- [Special Labels](special-labels/)
|
||||
- [Releasing a new version](releasing-a-new-version/)
|
||||
|
||||
Interested in becoming a maintainer? Here is some documentation for **contributors**:
|
||||
|
||||
1. [Becoming a maintainer](becoming-a-maintainer/)
|
||||
- [Becoming a maintainer](becoming-a-maintainer/)
|
||||
|
||||
@@ -16,7 +16,7 @@ All pull requests should be subject to code review. Code review is a [foundation
|
||||
We have [a helpful little bot](https://github.com/jekyllbot) which we use to merge pull requests. We don't use the GitHub.com interface for two reasons:
|
||||
|
||||
1. You can't modify anything on mobile (e.g. titles, labels)
|
||||
2. Provide a consistent paper trail in the `History.markdown` file for each release
|
||||
2. We like to provide a consistent paper trail in the `History.markdown` file for each release
|
||||
|
||||
To merge a pull request, leave a comment thanking the contributor, then add the special merge request:
|
||||
|
||||
@@ -30,12 +30,12 @@ The merge request is made up of three things:
|
||||
|
||||
1. `@jekyllbot:` – this is the prefix our bot looks for when processing commands
|
||||
2. `merge` – the command
|
||||
3. `+dev` – the category to which the changes belong
|
||||
3. `+dev` – the category to which the changes belong.
|
||||
|
||||
The categories match the H3's in the history/changelog file, and they are:
|
||||
The categories match the headings in the `History.markdown` file, and they are:
|
||||
|
||||
1. Major Enhancements (`+major`) – major updates or breaking changes to the code which necessitate a major version bump (v3 ~> v4)
|
||||
2. Minor Enhancements (`+minor`) – minor updates (feature, enhancement) which necessitate a minor version bump (v3.1 ~> v3.2)
|
||||
2. Minor Enhancements (`+minor`) – minor updates (with the labels `feature` or `enhancement`) which necessitate a minor version bump (v3.1 ~> v3.2)
|
||||
3. Bug Fixes (`+bug`) – corrections to code which do not change or add functionality, which necessitate a patch version bump (v3.1.0 ~> v3.1.1)
|
||||
4. Documentation (`+doc`) - changes to the documentation found in `docs/_docs/`
|
||||
5. Site Enhancements (`+site`) – changes to the source of [https://jekyllrb.com](https://jekyllrb.com) found in `docs/`
|
||||
|
||||
89
docs/_docs/maintaining/releasing-a-new-version.md
Normal file
89
docs/_docs/maintaining/releasing-a-new-version.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
title: "Releasing a new version"
|
||||
---
|
||||
|
||||
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
|
||||
{: .note .info }
|
||||
|
||||
The most important thing to understand before making a release is that there's no need to feel nervous. Most things are revertable, and even if you do publish an incomplete gem version, we can always skip that one. Don't hestitate to contact the other maintainers if you feel unsure or don't know what to do next.
|
||||
|
||||
### Bump the version
|
||||
|
||||
The only important place you need to manually bump the version is in `lib/jekyll/version.rb`. Adjust that, and everything else should work fine.
|
||||
|
||||
### Update the history document
|
||||
|
||||
Replace the first header of the history document with a version milestone. This looks like the following:
|
||||
|
||||
```diff
|
||||
-## HEAD
|
||||
+## 3.7.1 / 2018-01-25
|
||||
```
|
||||
|
||||
Adjust the version number and the date. The `## HEAD` heading will be regenerated next time a pull request is merged.
|
||||
|
||||
Once you've done this, update the website by running the following command:
|
||||
|
||||
```sh
|
||||
bundle exec rake site:generate
|
||||
```
|
||||
|
||||
This updates the website's changelog, and pushes the versions in various other places.
|
||||
|
||||
It's recommended that you go over the `History.markdown` file manually one more time, in case there are any spelling errors or such. Feel free to fix those manually, and after you're done generating the website changelog, commit your changes.
|
||||
|
||||
## Write a release post
|
||||
|
||||
In case this isn't done already, you can generate a new release post using the included `rake` command:
|
||||
|
||||
```sh
|
||||
bundle exec rake site:releases:new[3.8.0]
|
||||
```
|
||||
|
||||
where `3.8.0` should be replaced with the new version. Then, write the post. Be sure to thank all of the collaborators and maintainers who have contributed since the last release. You can generate a log of their names using the following command:
|
||||
|
||||
```sh
|
||||
git shortlog -sn master...v3.7.2
|
||||
```
|
||||
|
||||
where, again `v3.7.2` is the last release. Be sure to open a pull request for your release post.
|
||||
|
||||
### Push the version
|
||||
|
||||
Before you do this step, make sure the following things are done:
|
||||
|
||||
- You have permission to push a new gem version to RubyGems
|
||||
- You're logged into RubyGems on your command line
|
||||
- A release post has been prepared, and is ideally already live
|
||||
- All of the prior steps are done, committed, and pushed to `master`
|
||||
|
||||
Really the only thing left to do is to run this command:
|
||||
|
||||
```sh
|
||||
bundle exec rake release
|
||||
```
|
||||
|
||||
This will automatically build the new gem, make a release commit and tag and then push the new gem to RubyGems. Don't worry about creating a GitHub release, @jekyllbot should take care of that.
|
||||
|
||||
And then, you're done! :tada: Feel free to celebrate!
|
||||
|
||||
If you have access to the [@jekyllrb](https://twitter.com/jekyllrb) Twitter account, you should tweet the release post from there. If not, just ask another maintainer to do it or to give you access.
|
||||
|
||||
### Build the docs
|
||||
|
||||
We package our documentation as a :gem: Gem for offline use.
|
||||
|
||||
This is done with the
|
||||
[**jekyll-docs**](https://github.com/jekyll/jekyll-docs#building) repository,
|
||||
and more detailed instructions are provided there.
|
||||
|
||||
## For non-core gems
|
||||
|
||||
If you're not a maintainer for `jekyll/jekyll`, the procedure is much simpler in a lot of cases. Generally, the procedure still looks like this:
|
||||
|
||||
- Bump the gem version manually, usually in `lib/<plugin_name>/version.rb`
|
||||
- Adjust the history file
|
||||
- Run `bundle exec rake release` or `script/release`, depending on which of the two exists
|
||||
- Rejoice
|
||||
|
||||
Be sure to ask your project's maintainers if you're unsure!
|
||||
@@ -14,7 +14,7 @@ your `_config.yml` under `plugins`. For Jekyll 2, this is standard.
|
||||
<div class="note info">
|
||||
<h5>Pagination only works within HTML files</h5>
|
||||
<p>
|
||||
Pagination does not work from within Markdown or Textile files from
|
||||
Pagination does not work from within Markdown files from
|
||||
your Jekyll site. Pagination works when called from within the HTML
|
||||
file, named <code>index.html</code>, which optionally may reside in and
|
||||
produce pagination from within a subdirectory, via the
|
||||
|
||||
@@ -6,7 +6,7 @@ permalink: /docs/permalinks/
|
||||
Permalinks refer to the URLs (excluding the domain name or directory folder) for your pages, posts, or collections.
|
||||
Jekyll supports a flexible way to build permalinks, allowing you to leverage various template variables or choose built-in permalink styles (such as `date`) that automatically use a template-variable pattern.
|
||||
|
||||
You construct permalinks by creating a template URL where dynamic elements are represented by colon-prefixed keywords. The default template permalink is `/:categories/:year/:month/:day/:title.html`. Each of the colon-prefixed keywords is a template variable.
|
||||
You construct permalinks by creating a template URL where dynamic elements are represented by colon-prefixed keywords. The default template permalink is `/:categories/:year/:month/:day/:title:output_ext`. Each of the colon-prefixed keywords is a template variable.
|
||||
|
||||
## Where to configure permalinks
|
||||
|
||||
@@ -15,7 +15,7 @@ You can configure your site's permalinks through the [Configuration]({% link _do
|
||||
Setting permalink styles in your configuration file applies the setting globally in your project. You configure permalinks in your `_config.yml` file like this:
|
||||
|
||||
```yaml
|
||||
permalink: /:categories/:year/:month/:day/:title.html
|
||||
permalink: /:categories/:year/:month/:day/:title:output_ext
|
||||
```
|
||||
|
||||
If you don't specify any permalink setting, Jekyll uses the above pattern as the default.
|
||||
@@ -26,7 +26,7 @@ The permalink can also be set using a built-in permalink style:
|
||||
permalink: date
|
||||
```
|
||||
|
||||
`date` is the same as `:categories/:year/:month/:day/:title.html`, the default. See [Built-in Permalink Styles](#builtinpermalinkstyles) below for more options.
|
||||
`date` is the same as `:categories/:year/:month/:day/:title:output_ext`, the default. See [Built-in Permalink Styles](#builtinpermalinkstyles) below for more options.
|
||||
|
||||
Setting the permalink in your post, page, or collection's front matter overrides any global settings. Here's an example:
|
||||
|
||||
@@ -226,7 +226,7 @@ Although you can specify a custom permalink pattern using [template variables](#
|
||||
<p><code>date</code></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><code>/:categories/:year/:month/:day/:title.html</code></p>
|
||||
<p><code>/:categories/:year/:month/:day/:title:output_ext</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -242,7 +242,7 @@ Although you can specify a custom permalink pattern using [template variables](#
|
||||
<p><code>ordinal</code></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><code>/:categories/:year/:y_day/:title.html</code></p>
|
||||
<p><code>/:categories/:year/:y_day/:title:output_ext</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -250,7 +250,7 @@ Although you can specify a custom permalink pattern using [template variables](#
|
||||
<p><code>none</code></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><code>/:categories/:title.html</code></p>
|
||||
<p><code>/:categories/:title:output_ext</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -297,7 +297,7 @@ Given a post named: `/2009-04-29-slap-chop.md`
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><code>/:month-:day-:year/:title.html</code></p>
|
||||
<p><code>/:month-:day-:year/:title:output_ext</code></p>
|
||||
</td>
|
||||
<td>
|
||||
<p><code>/04-29-2009/slap-chop.html</code></p>
|
||||
@@ -330,7 +330,7 @@ The permalink setting in your configuration file specifies the permalink style u
|
||||
|
||||
For example:
|
||||
|
||||
* A permalink style of `/:categories/:year/:month/:day/:title.:output_ext` for posts becomes `/:title.html` for pages and collections.
|
||||
* A permalink style of `/:categories/:year/:month/:day/:title:output_ext` for posts becomes `/:title.html` for pages and collections.
|
||||
* A permalink style of `pretty` (or `/:categories/:year/:month/:day/:title/`), which omits the file extension and contains a trailing slash, will update page and collection permalinks to also omit the file extension and contain a trailing slash: `/:title/`.
|
||||
* A permalink style of `date`, which contains a trailing file extension, will update page permalinks to also contain a trailing file extension: `/:title.html`. But no time or category information will be included.
|
||||
|
||||
|
||||
@@ -94,7 +94,11 @@ In general, plugins you make will fall broadly into one of five categories:
|
||||
4. [Tags](#tags)
|
||||
5. [Hooks](#hooks)
|
||||
|
||||
See the bottom of the page for a [list of available plugins](#available-plugins)
|
||||
See the bottom of the page for a [list of available plugins](#available-plugins).
|
||||
|
||||
For further information on how to develop your own plugins, check out the [Liquid documentation](https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers) as well.
|
||||
|
||||
If you never developed a Jekyll plugin [check this useful wrap-up](https://ayastreb.me/writing-a-jekyll-plugin/) by @ayastreb to get started.
|
||||
|
||||
## Generators
|
||||
|
||||
@@ -753,10 +757,6 @@ You can find a few useful plugins at the following locations:
|
||||
|
||||
#### Generators
|
||||
|
||||
- [ArchiveGenerator by Ilkka Laukkanen](https://gist.github.com/707909): Uses [this archive page](https://gist.github.com/707020) to generate archives.
|
||||
- [LESS.js Generator by Andy Fowler](https://gist.github.com/642739): Renders
|
||||
LESS.js files during generation.
|
||||
- [Version Reporter by Blake Smith](https://gist.github.com/449491): Creates a version.html file containing the Jekyll version.
|
||||
- [Sitemap.xml Generator by Michael Levin](https://github.com/kinnetica/jekyll-plugins): Generates a sitemap.xml file by traversing all of the available posts and pages.
|
||||
- [Full-text search by Pascal Widdershoven](https://github.com/PascalW/jekyll_indextank): Adds full-text search to your Jekyll site with a plugin and a bit of JavaScript.
|
||||
- [AliasGenerator by Thomas Mango](https://github.com/tsmango/jekyll_alias_generator): Generates redirect pages for posts when an alias is specified in the YAML Front Matter.
|
||||
@@ -772,7 +772,6 @@ LESS.js files during generation.
|
||||
- [Typescript Generator by Matt Sheehan](https://github.com/sheehamj13/jekyll_ts): Generate Javascript on build from your Typescript.
|
||||
- [Jekyll::AutolinkEmail by Ivan Tse](https://github.com/ivantsepp/jekyll-autolink_email): Autolink your emails.
|
||||
- [Jekyll::GitMetadata by Ivan Tse](https://github.com/ivantsepp/jekyll-git_metadata): Expose Git metadata for your templates.
|
||||
- [Jekyll Http Basic Auth Plugin](https://gist.github.com/snrbrnjna/422a4b7e017192c284b3): Plugin to manage http basic auth for jekyll generated pages and directories.
|
||||
- [Jekyll Auto Image by Merlos](https://github.com/merlos/jekyll-auto-image): Gets the first image of a post. Useful to list your posts with images or to add [twitter cards](https://dev.twitter.com/cards/overview) to your site.
|
||||
- [Jekyll Portfolio Generator by Shannon Babincsak](https://github.com/codeinpink/jekyll-portfolio-generator): Generates project pages and computes related projects out of project data files.
|
||||
- [Jekyll-Umlauts by Arne Gockeln](https://github.com/webchef/jekyll-umlauts): This generator replaces all german umlauts (äöüß) case sensitive with html.
|
||||
@@ -786,25 +785,19 @@ LESS.js files during generation.
|
||||
- [Tweetsert](https://github.com/ibrado/jekyll-tweetsert): Imports tweets (Twitter statuses) as new posts. Features multiple timeline support, hashtag import, filtering, automatic category and/or tags, optional retweets and replies.
|
||||
- [Stickyposts](https://github.com/ibrado/jekyll-stickyposts): Moves or copies (pins) posts marked `sticky: true` to the top of the list. Perfect for keeping important announcements on the home page, or giving collections a descriptive entry. Paginator friendly.
|
||||
- [Jekyll::Paginate::Content](https://github.com/ibrado/jekyll-paginate-content): Content paginator in the style of jekyll-paginator-v2 that splits pages, posts, and collection entries into several pages. Specify a separator or use HTML <h1> etc. headers. Automatic splitting, single-page view, pager/trail, self-adjusting links, multipage TOC, SEO support.
|
||||
- [Premonition](https://github.com/amedia/premonition): Adds block-styled side content to your page. For example summary, notes, hints or warning boxes.
|
||||
- [jekyll-fontello](https://github.com/ericcornelissen/jekyll-fontello): A Jekyll plugin that automatically downloads your webfont from Fontello.
|
||||
- [Target Blank](https://github.com/keithmifsud/jekyll-target-blank): A Jekyll plugin to automatically open external links in a new browser tab or window.
|
||||
- [jekyll-info](https://github.com/swestmoreland/jekyll-info): A plugin to provide information about your Jekyll site’s configuration.
|
||||
|
||||
#### Converters
|
||||
|
||||
- [Pug plugin by Doug Beney](http://jekyll-pug.dougie.io): Use the popular Pug (previously Jade) templating language in Jekyll. Complete with caching, includes support, and much more.
|
||||
- [Textile converter](https://github.com/jekyll/jekyll-textile-converter): Convert `.textile` files into HTML. Also includes the `textilize` Liquid filter.
|
||||
- [Slim plugin](https://github.com/slim-template/jekyll-slim): Slim converter and includes for Jekyll with support for Liquid tags.
|
||||
- [HAML plugin by Sam Z](https://gist.github.com/517556): HAML converter for Jekyll.
|
||||
- [HAML-Sass Converter by Adam Pearson](https://gist.github.com/481456): Simple HAML-Sass converter for Jekyll. [Fork](https://gist.github.com/528642) by Sam X.
|
||||
- [Sass SCSS Converter by Mark Wolfe](https://gist.github.com/960150): Sass converter which uses the new CSS compatible syntax, based Sam X’s fork above.
|
||||
- [LESS Converter by Jason Graham](https://gist.github.com/639920): Convert LESS files to CSS.
|
||||
- [LESS Converter by Josh Brown](https://gist.github.com/760265): Simple LESS converter.
|
||||
- [Upcase Converter by Blake Smith](https://gist.github.com/449463): An example Jekyll converter.
|
||||
- [CoffeeScript Converter by phaer](https://gist.github.com/959938): A [CoffeeScript](http://coffeescript.org) to Javascript converter.
|
||||
- [Markdown References by Olov Lassus](https://github.com/olov/jekyll-references): Keep all your markdown reference-style link definitions in one \_references.md file.
|
||||
- [Stylus Converter](https://gist.github.com/988201): Convert .styl to .css.
|
||||
- [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting.
|
||||
- [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandoc’s markdown extensions.
|
||||
- [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work).
|
||||
- [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
|
||||
- [Customized Kramdown Converter](https://github.com/mvdbos/kramdown-with-pygments): Enable Pygments syntax highlighting for Kramdown-parsed fenced code blocks.
|
||||
- [Bigfootnotes Plugin](https://github.com/TheFox/jekyll-bigfootnotes): Enables big footnotes for Kramdown.
|
||||
- [AsciiDoc Plugin](https://github.com/asciidoctor/jekyll-asciidoc): AsciiDoc convertor for Jekyll using [Asciidoctor](http://asciidoctor.org/).
|
||||
@@ -815,9 +808,7 @@ LESS.js files during generation.
|
||||
|
||||
- [Truncate HTML](https://github.com/MattHall/truncatehtml) by [Matt Hall](https://codebeef.com/): A Jekyll filter that truncates HTML while preserving markup structure.
|
||||
- [Domain Name Filter by Lawrence Woodman](https://github.com/LawrenceWoodman/domain_name-liquid_filter): Filters the input text so that just the domain name is left.
|
||||
- [Summarize Filter by Mathieu Arnold](https://gist.github.com/731597): Remove markup after a `<div id="extended">` tag.
|
||||
- [Smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics.
|
||||
- [Read in X Minutes](https://gist.github.com/zachleat/5792681) by [zachleat](https://github.com/zachleat): Estimates the reading time of a string (for blog post content).
|
||||
- [Jekyll-timeago](https://github.com/markets/jekyll-timeago): Converts a time value to the time ago in words.
|
||||
- [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a grammatically-correct amount like “1 minute” or “2 minute**s**”.
|
||||
- [reading_time](https://github.com/bdesham/reading_time): Count words and estimate reading time for a piece of text, ignoring HTML elements that are unlikely to contain running text.
|
||||
@@ -836,6 +827,8 @@ LESS.js files during generation.
|
||||
- [match_regex](https://github.com/sparanoid/match_regex): A Liquid filter to perform regex match.
|
||||
- [replace_regex](https://github.com/sparanoid/replace_regex): A Liquid filter to perform regex replace.
|
||||
- [Jekyll Money](https://rubygems.org/gems/jekyll-money): A Jekyll plugin for dealing with money. Because we all have to at some point.
|
||||
- [jekyll-random](https://github.com/codecalm/jekyll-random) by [codecalm](https://nodecalm.net): A Jekyll plugin that generates pseudo-random data. Very useful when you want to generate a large amount of random data.
|
||||
- [jekyll-firstimage](https://github.com/nhoizey/jekyll-firstimage) adds a Liquid filter finding the first image in a HTML content string, including responsive images srcset.
|
||||
|
||||
#### Tags
|
||||
|
||||
@@ -844,30 +837,16 @@ You can find a few useful plugins at the following locations:
|
||||
- [Jekyll-gist](https://github.com/jekyll/jekyll-gist): Use the `gist` tag to easily embed a GitHub Gist onto your site. This works with public or secret gists.
|
||||
- [Asset Path Tag](https://github.com/samrayner/jekyll-asset-path-plugin) by [Sam Rayner](http://www.samrayner.com/): Allows organisation of assets into subdirectories by outputting a path for a given file relative to the current post or page.
|
||||
- [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
|
||||
- [Ultraviolet Plugin by Steve Alex](https://gist.github.com/480380): Jekyll tag for the [Ultraviolet](https://github.com/grosser/ultraviolet) code highligher.
|
||||
- [Tag Cloud Plugin by Ilkka Laukkanen](https://gist.github.com/710577): Generate a tag cloud that links to tag pages.
|
||||
- [GIT Tag by Alexandre Girard](https://gist.github.com/730347): Add Git activity inside a list.
|
||||
- [MathJax Liquid Tags by Jessy Cowan-Sharp](https://gist.github.com/834610): Simple liquid tags for Jekyll that convert inline math and block equations to the appropriate MathJax script tags.
|
||||
- [Non-JS Gist Tag by Brandon Tilley](https://gist.github.com/1027674) A Liquid tag that embeds Gists and shows code for non-JavaScript enabled browsers and readers.
|
||||
- [Render Time Tag by Blake Smith](https://gist.github.com/449509): Displays the time a Jekyll page was generated.
|
||||
- [Status.net/OStatus Tag by phaer](https://gist.github.com/912466): Displays the notices in a given status.net/ostatus feed.
|
||||
- [Embed.ly client by Robert Böhnke](https://github.com/robb/jekyll-embedly-client): Autogenerate embeds from URLs using oEmbed.
|
||||
- [Logarithmic Tag Cloud](https://gist.github.com/2290195): Flexible. Logarithmic distribution. Documentation inline.
|
||||
- [oEmbed Tag by Tammo van Lessen](https://gist.github.com/1455726): Enables easy content embedding (e.g. from YouTube, Flickr, Slideshare) via oEmbed.
|
||||
- [FlickrSetTag by Thomas Mango](https://github.com/tsmango/jekyll_flickr_set_tag): Generates image galleries from Flickr sets.
|
||||
- [Tweet Tag by Scott W. Bradley](https://github.com/scottwb/jekyll-tweet-tag): Liquid tag for [Embedded Tweets](https://dev.twitter.com/docs/embedded-tweets) using Twitter’s shortcodes.
|
||||
- [Jekyll Twitter Plugin](https://github.com/rob-murray/jekyll-twitter-plugin): A Liquid tag plugin that renders Tweets from Twitter API. Currently supports the [oEmbed](https://dev.twitter.com/rest/reference/get/statuses/oembed) API.
|
||||
- [Jekyll-contentblocks](https://github.com/rustygeldmacher/jekyll-contentblocks): Lets you use Rails-like content_for tags in your templates, for passing content from your posts up to your layouts.
|
||||
- [Generate YouTube Embed](https://gist.github.com/1805814) by [joelverhagen](https://github.com/joelverhagen): Jekyll plugin which allows you to embed a YouTube video in your page with the YouTube ID. Optionally specify width and height dimensions. Like “oEmbed Tag” but just for YouTube.
|
||||
- [Jekyll-beastiepress](https://github.com/okeeblow/jekyll-beastiepress): FreeBSD utility tags for Jekyll sites.
|
||||
- [Jsonball](https://gist.github.com/1895282): Reads json files and produces maps for use in Jekyll files.
|
||||
- [Bibjekyll](https://github.com/pablooliveira/bibjekyll): Render BibTeX-formatted bibliographies/citations included in posts and pages using bibtex2html.
|
||||
- [Jekyll-citation](https://github.com/archome/jekyll-citation): Render BibTeX-formatted bibliographies/citations included in posts and pages (pure Ruby).
|
||||
- [Jekyll Dribbble Set Tag](https://github.com/ericdfields/Jekyll-Dribbble-Set-Tag): Builds Dribbble image galleries from any user.
|
||||
- [Debbugs](https://gist.github.com/2218470): Allows posting links to Debian BTS easily.
|
||||
- [Jekyll-devonly_tag](https://gist.github.com/2403522): A block tag for including markup only during development.
|
||||
- [JekyllGalleryTag](https://github.com/redwallhp/JekyllGalleryTag) by [redwallhp](https://github.com/redwallhp): Generates thumbnails from a directory of images and displays them in a grid.
|
||||
- [Youku and Tudou Embed](https://gist.github.com/Yexiaoxing/5891929): Liquid plugin for embedding Youku and Tudou videos.
|
||||
- [Jekyll-swfobject](https://github.com/sectore/jekyll-swfobject): Liquid plugin for embedding Adobe Flash files (.swf) using [SWFObject](https://github.com/swfobject/swfobject).
|
||||
- [Jekyll Picture Tag](https://github.com/robwierzbowski/jekyll-picture-tag): Easy responsive images for Jekyll. Based on the proposed [`<picture>`](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element) element, polyfilled with Scott Jehl’s [Picturefill](https://github.com/scottjehl/picturefill).
|
||||
- [Jekyll Image Tag](https://github.com/robwierzbowski/jekyll-image-tag): Better images for Jekyll. Save image presets, generate resized images, and add classes, alt text, and other attributes.
|
||||
@@ -877,8 +856,6 @@ You can find a few useful plugins at the following locations:
|
||||
- [Jekyll Date Chart](https://github.com/GSI/jekyll_date_chart) by [GSI](https://github.com/GSI): Block that renders date line charts based on textile-formatted tables.
|
||||
- [Jekyll Image Encode](https://github.com/GSI/jekyll_image_encode) by [GSI](https://github.com/GSI): Tag that renders base64 codes of images fetched from the web.
|
||||
- [Jekyll Quick Man](https://github.com/GSI/jekyll_quick_man) by [GSI](https://github.com/GSI): Tag that renders pretty links to man page sources on the internet.
|
||||
- [jekyll-font-awesome](https://gist.github.com/23maverick23/8532525): Quickly and easily add Font Awesome icons to your posts.
|
||||
- [Lychee Gallery Tag](https://gist.github.com/tobru/9171700) by [tobru](https://github.com/tobru): Include [Lychee](https://lychee.electerious.com/) albums into a post. For an introduction, see [Jekyll meets Lychee - A Liquid Tag plugin](https://tobrunet.ch/articles/jekyll-meets-lychee-a-liquid-tag-plugin/)
|
||||
- [Image Set/Gallery Tag](https://github.com/callmeed/jekyll-image-set) by [callmeed](https://github.com/callmeed): Renders HTML for an image gallery from a folder in your Jekyll site. Just pass it a folder name and class/tag options.
|
||||
- [jekyll_figure](https://github.com/lmullen/jekyll_figure): Generate figures and captions with links to the figure in a variety of formats
|
||||
- [Jekyll GitHub Sample Tag](https://github.com/bwillis/jekyll-github-sample): A liquid tag to include a sample of a github repo file in your Jekyll site.
|
||||
@@ -909,8 +886,11 @@ You can find a few useful plugins at the following locations:
|
||||
plugin to generate publication lists from [BibSonomy](https://www.bibsonomy.org/).
|
||||
- [github-cards](https://github.com/edward-shen/github-cards): Creates styleable Github cards for your Github projects.
|
||||
- [disqus-for-jekyll](https://github.com/kacperduras/disqus-for-jekyll): A Jekyll plugin to view the comments powered by Disqus.
|
||||
- [jekyll-html](https://github.com/kacperduras/jekyll-html): A Jekyll plugin to use HTML tags in Jekyll pages, posts and collections.
|
||||
|
||||
- [jekyll-html](https://github.com/kacperduras/jekyll-html): A Jekyll plugin to use HTML tags in Jekyll pages, posts and collections.
|
||||
- [jekyll-onebox](https://github.com/rriemann/jekyll-onebox): Liquid tag for displaying HTML previews (embeds) for links to popular domains. Plugin is based on [Onebox](https://github.com/discourse/onebox) that powers link previews in [Discourse](http://github.com/discourse/discourse) forums.
|
||||
- [jekyll-w2m](https://github.com/kacperduras/jekyll-w2m): A Jekyll plugin to liberate content from Microsoft Word documents (powered by [word-to-markdown](https://github.com/benbalter/word-to-markdown)).
|
||||
- [jekyll-flickr](https://github.com/rriemann/jekyll-flickr): Liquid tag for responsive Flickr images using HTML5 srcset. Subtitles and automatic license notices are supported.
|
||||
- [CAT](https://github.com/binfalse/jekyll-cat): Include the contents of any file (like the `include` command, but also for files outside of `_include`). Similar to Unix' `cat` tool; useful for including source code etc. in posts and pages.
|
||||
|
||||
#### Collections
|
||||
|
||||
@@ -923,12 +903,8 @@ You can find a few useful plugins at the following locations:
|
||||
- [Analytics for Jekyll](https://github.com/hendrikschneider/jekyll-analytics) by Hendrik Schneider: An effortless way to add various trackers like Google Analytics, Matomo (formerly Piwik), mPulse, etc. to your site.
|
||||
- [ditaa-ditaa](https://github.com/tmthrgd/ditaa-ditaa) by Tom Thorogood: a drastic revision of jekyll-ditaa that renders diagrams drawn using ASCII art into PNG images.
|
||||
- [Pygments Cache Path by Raimonds Simanovskis](https://github.com/rsim/blog.rayapps.com/blob/master/_plugins/pygments_cache_patch.rb): Plugin to cache syntax-highlighted code from Pygments.
|
||||
- [Draft/Publish Plugin by Michael Ivey](https://gist.github.com/49630): Save posts as drafts.
|
||||
- [Growl Notification Generator by Tate Johnson](https://gist.github.com/490101): Send Jekyll notifications to Growl.
|
||||
- [Growl Notification Hook by Tate Johnson](https://gist.github.com/525267): Better alternative to the above, but requires his “hook” fork.
|
||||
- [Related Posts by Lawrence Woodman](https://github.com/LawrenceWoodman/related_posts-jekyll_plugin): Overrides `site.related_posts` to use categories to assess relationship.
|
||||
- [jekyll-tagging-related_posts](https://github.com/toshimaru/jekyll-tagging-related_posts): Jekyll related_posts function based on tags (works on Jekyll3).
|
||||
- [Tiered Archives by Eli Naeher](https://gist.github.com/88cda643aa7e3b0ca1e5): Create tiered template variable that allows you to group archives by year and month.
|
||||
- [Jekyll-localization](https://github.com/blackwinter/jekyll-localization): Jekyll plugin that adds localization features to the rendering engine.
|
||||
- [Jekyll-rendering](https://github.com/blackwinter/jekyll-rendering): Jekyll plugin to provide alternative rendering engines.
|
||||
- [Jekyll-pagination](https://github.com/blackwinter/jekyll-pagination): Jekyll plugin to extend the pagination generator.
|
||||
@@ -936,7 +912,6 @@ You can find a few useful plugins at the following locations:
|
||||
- [Jekyll-scholar](https://github.com/inukshuk/jekyll-scholar): Jekyll extensions for the blogging scholar.
|
||||
- [Jekyll-assets](http://jekyll.github.io/jekyll-assets/) by [ixti](https://github.com/ixti): Rails-alike assets pipeline (write assets in CoffeeScript, Sass, LESS etc; specify dependencies for automatic bundling using simple declarative comments in assets; minify and compress; use JST templates; cache bust; and many-many more).
|
||||
- [JAPR](https://github.com/kitsched/japr): Jekyll Asset Pipeline Reborn - Powerful asset pipeline for Jekyll that collects, converts and compresses JavaScript and CSS assets.
|
||||
- [File compressor](https://gist.github.com/2758691) by [mytharcher](https://github.com/mytharcher): Compress HTML and JavaScript files on site build.
|
||||
- [Jekyll-minibundle](https://github.com/tkareine/jekyll-minibundle): Asset bundling and cache busting using external minification tool of your choice. No gem dependencies.
|
||||
- [Singlepage-jekyll](https://github.com/JCB-K/singlepage-jekyll) by [JCB-K](https://github.com/JCB-K): Turns Jekyll into a dynamic one-page website.
|
||||
- [generator-jekyllrb](https://github.com/robwierzbowski/generator-jekyllrb): A generator that wraps Jekyll in [Yeoman](http://yeoman.io/), a tool collection and workflow for building modern web apps.
|
||||
@@ -964,12 +939,14 @@ You can find a few useful plugins at the following locations:
|
||||
- [jekyll-numbered-headings](https://github.com/muratayusuke/jekyll-numbered-headings): Adds ordered number to headings.
|
||||
- [jekyll-pre-commit](https://github.com/mpchadwick/jekyll-pre-commit): A framework for running checks against your posts using a git pre-commit hook before you publish them.
|
||||
- [jekyll-pwa-plugin](https://github.com/lavas-project/jekyll-pwa): A plugin provides PWA support for Jekyll. It generates a service worker in Jekyll build process and makes precache and runtime cache available in the runtime with Google Workbox.
|
||||
- [jekyll-algolia](https://community.algolia.com/jekyll-algolia/): Add fast and relevant search to your Jekyll site through the Algolia API.
|
||||
- [jekyll-get](https://github.com/18F/jekyll-get): Download data from external JSON API sources to use in generating a site.
|
||||
- [jekyll-xml-source](https://github.com/mcred/jekyll-xml-source): Download XML and RSS from external sites for use in site data.
|
||||
|
||||
<div class="note info">
|
||||
<h5>Jekyll Plugins Wanted</h5>
|
||||
<h5>Submit your gem plugins</h5>
|
||||
<p>
|
||||
If you have a Jekyll plugin that you would like to see added to this list,
|
||||
you should <a href="../contributing/">read the contributing page</a> to find
|
||||
You're encouraged to add your Jekyll gem plugins to this list, <a href="../contributing/">read the contributing page</a> to find
|
||||
out how to make that happen.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -201,13 +201,38 @@ category: blog
|
||||
|
||||
In this case, the listing pages will be accessible at `{baseurl}/category/blog.html`
|
||||
|
||||
While this example is done with categories, you can easily extend your lists to
|
||||
filter by tags or any other variable created with extensions.
|
||||
Although categories and tags are very similar, they are used to group posts,
|
||||
there are a few differences between them. Categories and sub-categories create
|
||||
hierarchies that, by default, are reflected in the directory structure of your
|
||||
site. A post with the following header
|
||||
```yaml
|
||||
---
|
||||
layout: post
|
||||
title: A Trip
|
||||
category: [ blog, travel ]
|
||||
---
|
||||
```
|
||||
will be accessible at `{baseurl}/blog/travel/year/month/day/A-Trip.html`. On
|
||||
the other hand, a tagged post
|
||||
```yaml
|
||||
---
|
||||
layout: post
|
||||
title: A Trip
|
||||
tags: [ blog, travel ]
|
||||
---
|
||||
```
|
||||
will be saved as `{baseurl}/year/month/day/A-Trip.html`. It is up to you to
|
||||
create `{baseurl}/tag/blog.html` and `{baseurl}/tag/travel.html` the same way as
|
||||
described above for categories.
|
||||
|
||||
While this example is done with tags and categories, you can easily extend your
|
||||
lists to filter by any other variable created with extensions.
|
||||
|
||||
## Post excerpts
|
||||
|
||||
Each post automatically takes the first block of text, from the beginning of
|
||||
the content to the first occurrence of `excerpt_separator`, and sets it as the `post.excerpt`.
|
||||
the content to the first occurrence of `excerpt_separator`, and sets it in the
|
||||
post's data hash.
|
||||
Take the above example of an index of posts. Perhaps you want to include
|
||||
a little hint about the post's content by adding the first paragraph of each of
|
||||
your posts:
|
||||
|
||||
@@ -26,13 +26,15 @@ If you encounter any unexpected errors during the above, please refer to the [tr
|
||||
|
||||
## About Bundler
|
||||
|
||||
`gem install jekyll bundler` installs the [jekyll](https://rubygems.org/gems/jekyll/) and [bundler](https://rubygems.org/gems/bundler) gems through [RubyGems](https://rubygems.org/). You need only to install the gems one time — not every time you create a new Jekyll project. Here are some additional details:
|
||||
`gem install bundler` installs the [bundler](https://rubygems.org/gems/bundler) gem through [RubyGems](https://rubygems.org/). You only need to install it once — not every time you create a new Jekyll project. Here are some additional details:
|
||||
|
||||
* `bundler` is a gem that manages other Ruby gems. It makes sure your gems and gem versions are compatible, and that you have all necessary dependencies each gem requires.
|
||||
* The `Gemfile` and `Gemfile.lock` files inform Bundler about the gem requirements in your site. If your site doesn't have these Gemfiles, you can omit `bundle exec` and just run `jekyll serve`.
|
||||
|
||||
* When you run `bundle exec jekyll serve`, Bundler uses the gems and versions as specified in `Gemfile.lock` to ensure your Jekyll site builds with no compatibility or dependency conflicts.
|
||||
|
||||
For more information about how to use Bundler in your Jekyll project, this [tutorial](https://jekyllrb.com/tutorials/using-jekyll-with-bundler/) should provide answers to the most common questions and explain how to get up and running quickly.
|
||||
|
||||
## Options for creating a new site with Jekyll
|
||||
|
||||
`jekyll new <PATH>` installs a new Jekyll site at the path specified (relative to current directory). In this case, Jekyll will be installed in a directory called `myblog`. Here are some additional details:
|
||||
|
||||
@@ -15,8 +15,8 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
|
||||
|
||||
## Useful Guides
|
||||
|
||||
- [Jekyll Tips](http://jekyll.tips) is a set of resources created by [CloudCannon](https://cloudcannon.com) to help folks get up and running with Jekyll. They cover all skill levels, and even include some great video tutorials.
|
||||
- [Jekyll Cheatsheet](http://jekyll.tips/jekyll-cheat-sheet/) is a single-page resource for Jekyll filters, variables, and the like.
|
||||
- [CloudCannon Academy](https://learn.cloudcannon.com/) is a set of resources created by [CloudCannon](https://cloudcannon.com/) to help folks get up and running with Jekyll. They cover all skill levels, and even include some great video tutorials.
|
||||
- [Jekyll Cheatsheet](https://learn.cloudcannon.com/jekyll-cheat-sheet/) is a single-page resource for Jekyll filters, variables, and the like.
|
||||
- ["Creating and Hosting a Personal Site on GitHub"](http://jmcglone.com/guides/github-pages/)
|
||||
- ['Build A Blog With Jekyll And GitHub Pages' on Smashing Magazine](https://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/)
|
||||
- Publishing to GitHub Pages? [Check out our documentation page for just that purpose](/docs/github-pages/).
|
||||
@@ -25,13 +25,14 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
|
||||
|
||||
## Integrations
|
||||
|
||||
- Use a saas service as a backend for forms (contact forms, hiring forms, etc.)
|
||||
- Use a SaaS service as a backend for forms (contact forms, hiring forms, etc.)
|
||||
|
||||
- [Formspree (open source)](https://formspree.io/)
|
||||
- [FormKeep](https://formkeep.com/guides/contact-form-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)
|
||||
- [Simple Form](https://getsimpleform.com/)
|
||||
- [Formingo](https://www.formingo.co/guides/jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=Jekyll%20Documentation)
|
||||
- [Formester](http://www.formester.com)
|
||||
- [Talkyard](https://www.talkyard.io/blog-comments): Embedded comments for Jekyll and others (free and open source, or hosted serverless)
|
||||
- [Staticman](https://staticman.net): Add user-generated content to a Jekyll site (free and open source)
|
||||
- [Snipcart](https://snipcart.com/blog/static-site-e-commerce-part-2-integrating-snipcart-with-jekyll): Add a shopping cart to a Jekyll site
|
||||
- [Contentful](https://www.contentful.com/ecosystem/jekyll/): use Jekyll together with the API-driven Contentful CMS.
|
||||
@@ -41,6 +42,8 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
|
||||
|
||||
- [How I'm using Jekyll in 2016](https://mademistakes.com/articles/using-jekyll-2016/)
|
||||
|
||||
- [Talkyard comments instructions for Jekyll](https://jekyll-demo.talkyard.io/2018/01/09/installation-instructions.html)
|
||||
|
||||
- [Static Comments with Jekyll & Staticman](https://mademistakes.com/articles/improving-jekyll-static-comments/)
|
||||
|
||||
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/05/adding-ajax-pagination-to-jekyll.html)
|
||||
|
||||
@@ -5,7 +5,8 @@ permalink: /docs/structure/
|
||||
|
||||
Jekyll is, at its core, a text transformation engine. The concept behind the
|
||||
system is this: you give it text written in your favorite markup language, be
|
||||
that Markdown, Textile, or just plain HTML, and it churns that through a layout
|
||||
that Markdown, [Textile](https://github.com/jekyll/jekyll-textile-converter)
|
||||
, or just plain HTML, and it churns that through a layout
|
||||
or a series of layout files. Throughout that process you can tweak how you want
|
||||
the site URLs to look, what data gets displayed in the layout, and more. This
|
||||
is all done through editing text files; the static web site is the final
|
||||
@@ -136,9 +137,9 @@ An overview of what each of these does:
|
||||
<p>
|
||||
Well-formatted site data should be placed here. The Jekyll engine
|
||||
will autoload all data files (using either the <code>.yml</code>,
|
||||
<code>.yaml</code>, <code>.json</code> or <code>.csv</code>
|
||||
formats and extensions) in this directory, and they will be
|
||||
accessible via `site.data`. If there's a file
|
||||
<code>.yaml</code>, <code>.json</code>, <code>.csv</code> or
|
||||
<code>.tsv</code> formats and extensions) in this directory,
|
||||
and they will be accessible via `site.data`. If there's a file
|
||||
<code>members.yml</code> under the directory, then you can access
|
||||
contents of the file through <code>site.data.members</code>.
|
||||
</p>
|
||||
@@ -185,7 +186,7 @@ An overview of what each of these does:
|
||||
<tr>
|
||||
<td>
|
||||
<p><code>index.html</code> or <code>index.md</code> and other HTML,
|
||||
Markdown, Textile files</p>
|
||||
Markdown files</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
|
||||
@@ -91,6 +91,21 @@ you come up with your own tags via plugins.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Date to String in ordinal US style</strong></p>
|
||||
<p>Format a date to ordinal, US, short format.
|
||||
{% include docs_version_badge.html version="3.8.0" %}</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ site.time | date_to_string: "ordinal", "US" }}{% endraw %}</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="output">Nov 7th, 2008</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Date to Long String</strong></p>
|
||||
@@ -105,6 +120,21 @@ you come up with your own tags via plugins.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Date to Long String in ordinal UK style</strong></p>
|
||||
<p>Format a date to ordinal, UK, long format.
|
||||
{% include docs_version_badge.html version="3.8.0" %}</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
<code class="filter">{% raw %}{{ site.time | date_to_long_string: "ordinal" }}{% endraw %}</code>
|
||||
</p>
|
||||
<p>
|
||||
<code class="output">7th November 2008</code>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Where</strong></p>
|
||||
@@ -119,7 +149,8 @@ you come up with your own tags via plugins.
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Where Expression</strong></p>
|
||||
<p>Select all the objects in an array where the expression is true. Jekyll v3.2.0 & later.</p>
|
||||
<p>Select all the objects in an array where the expression is true.
|
||||
{% include docs_version_badge.html version="3.2.0" %}</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
@@ -150,7 +181,8 @@ you come up with your own tags via plugins.
|
||||
<tr>
|
||||
<td>
|
||||
<p class="name"><strong>Group By Expression</strong></p>
|
||||
<p>Group an array's items using a Liquid expression.</p>
|
||||
<p>Group an array's items using a Liquid expression.
|
||||
{% include docs_version_badge.html version="3.4.0" %}</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p>
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Themes
|
||||
permalink: /docs/themes/
|
||||
---
|
||||
|
||||
Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package up layouts, includes, and stylesheets in a way that can be overridden by your site's content.
|
||||
Jekyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes specify plugins and package up assets, layouts, includes, and stylesheets in a way that can be overridden by your site's content.
|
||||
|
||||
## Understanding gem-based themes
|
||||
|
||||
@@ -19,8 +19,8 @@ In the case of Minima, you see only the following files in your Jekyll site dire
|
||||
├── _config.yml
|
||||
├── _posts
|
||||
│ └── 2016-12-04-welcome-to-jekyll.markdown
|
||||
├── about.md
|
||||
└── index.md
|
||||
├── about.markdown
|
||||
└── index.markdown
|
||||
```
|
||||
|
||||
The `Gemfile` and `Gemfile.lock` files are used by Bundler to keep track of the required gems and gem versions you need to build your Jekyll site.
|
||||
@@ -52,6 +52,8 @@ To locate a theme's files on your computer:
|
||||
open $(bundle show minima)
|
||||
# On Windows
|
||||
explorer /usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0
|
||||
# On Linux
|
||||
xdg-open $(bundle show minima)
|
||||
```
|
||||
|
||||
A Finder or Explorer window opens showing the theme's files and directories. The Minima theme gem contains these files:
|
||||
@@ -108,7 +110,48 @@ Suppose you want to get rid of the gem-based theme and convert it to a regular t
|
||||
|
||||
To do this, copy the files from the theme gem's directory into your Jekyll site directory. (For example, copy them to `/myblog` if you created your Jekyll site at `/myblog`. See the previous section for details.)
|
||||
|
||||
Then remove references to the theme gem in `Gemfile` and configuration. For example, to remove `minima`:
|
||||
Then you must tell Jekyll about the plugins that were referenced by the theme. You can find these plugins in the theme's gemspec file as runtime dependencies. If you were converting the Minima theme, for example, you might see:
|
||||
|
||||
```
|
||||
spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
|
||||
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"
|
||||
```
|
||||
|
||||
You should include these references in the `Gemfile` in one of two ways.
|
||||
|
||||
You could list them individually in both `Gemfile` and `_config.yml`.
|
||||
|
||||
```ruby
|
||||
# ./Gemfile
|
||||
|
||||
gem "jekyll-feed", "~> 0.9"
|
||||
gem "jekyll-seo-tag", "~> 2.1"
|
||||
```
|
||||
|
||||
```yaml
|
||||
# ./_config.yml
|
||||
|
||||
plugins:
|
||||
- jekyll-feed
|
||||
- jekyll-seo-tag
|
||||
```
|
||||
|
||||
Or you could list them explicitly as Jekyll plugins in your Gemfile, and not update `_config.yml`, like this:
|
||||
|
||||
```ruby
|
||||
# ./Gemfile
|
||||
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.9"
|
||||
gem "jekyll-seo-tag", "~> 2.1"
|
||||
end
|
||||
```
|
||||
|
||||
Either way, don't forget to `bundle update`.
|
||||
|
||||
However, if you're publishing on GitHub Pages you should update only your `_config.yml` as GitHub Pages doesn't load plugins via Bundler.
|
||||
|
||||
Finally, remove references to the theme gem in `Gemfile` and configuration. For example, to remove `minima`:
|
||||
|
||||
- Open `Gemfile` and remove `gem "minima", "~> 2.0"`.
|
||||
- Open `_config.yml` and remove `theme: minima`.
|
||||
@@ -123,20 +166,21 @@ For example, search for [jekyll theme on RubyGems](https://rubygems.org/search?u
|
||||
|
||||
To install a gem-based theme:
|
||||
|
||||
1. Add the theme to your site's `Gemfile`:
|
||||
1. Add the theme gem to your site's `Gemfile`:
|
||||
|
||||
```ruby
|
||||
# ./Gemfile
|
||||
|
||||
gem "jekyll-theme-awesome"
|
||||
# This is an example, declare the theme gem you want to use here
|
||||
gem "jekyll-theme-minimal"
|
||||
```
|
||||
Or if you've started with the `jekyll new` command, replace `gem "minima", "~> 2.0"` with your theme-gem:
|
||||
Or if you've started with the `jekyll new` command, replace `gem "minima", "~> 2.0"` with the gem you want, e.g:
|
||||
|
||||
```diff
|
||||
# ./Gemfile
|
||||
|
||||
- gem "minima", "~> 2.0"
|
||||
+ gem "jekyll-theme-awesome"
|
||||
+ gem "jekyll-theme-minimal"
|
||||
```
|
||||
|
||||
2. Install the theme:
|
||||
@@ -148,7 +192,7 @@ To install a gem-based theme:
|
||||
3. Add the following to your site's `_config.yml` to activate the theme:
|
||||
|
||||
```yaml
|
||||
theme: jekyll-theme-awesome
|
||||
theme: jekyll-theme-minimal
|
||||
```
|
||||
|
||||
4. Build your site:
|
||||
@@ -160,7 +204,7 @@ To install a gem-based theme:
|
||||
You can have multiple themes listed in your site's `Gemfile`, but only one theme can be selected in your site's `_config.yml`.
|
||||
{: .note .info }
|
||||
|
||||
If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only some gem-based themes. See [Supported Themes](https://pages.github.com/themes/) in GitHub's documentation to see which themes are supported.
|
||||
If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only [some gem-based themes](https://pages.github.com/themes/). GitHub Pages also supports [using any theme hosted on GitHub](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/#adding-a-jekyll-theme-in-your-sites-_configyml-file) using the `remote_theme` configuration as if it were a gem-based theme.
|
||||
|
||||
## Creating a gem-based theme
|
||||
|
||||
@@ -236,7 +280,7 @@ Your theme should include a `/README.md` file, which explains how site authors c
|
||||
|
||||
### Adding a screenshot
|
||||
|
||||
Themes are visual. Show users what your theme looks like by including a screenshot as `/screenshot.png` within your theme's repository where it can be retrieved programatically. You can also include this screenshot within your theme's documentation.
|
||||
Themes are visual. Show users what your theme looks like by including a screenshot as `/screenshot.png` within your theme's repository where it can be retrieved programmatically. You can also include this screenshot within your theme's documentation.
|
||||
|
||||
### Previewing your theme
|
||||
|
||||
|
||||
@@ -36,6 +36,12 @@ If you installed the above - specifically on Fedora 23 - but the extensions woul
|
||||
sudo dnf install redhat-rpm-config
|
||||
```
|
||||
|
||||
On Arch Linux you need to run:
|
||||
|
||||
```sh
|
||||
sudo pacman -S ruby-ffi
|
||||
```
|
||||
|
||||
On Ubuntu if you get stuck after `bundle exec jekyll serve` and see error
|
||||
messages like `Could not locate Gemfile` or `.bundle/ directory`, it's likely
|
||||
because all requirements have not been fully met. Recent stock Ubuntu
|
||||
@@ -97,6 +103,55 @@ Xcode.app can interfere with the command line tools downloaded above. If
|
||||
you run into this issue, upgrade Xcode and install the upgraded Command
|
||||
Line Tools.
|
||||
|
||||
### Running Jekyll as Non-Superuser (no sudo!)
|
||||
{: #no-sudo}
|
||||
|
||||
On most flavors of Linux, macOS, and Bash on Ubuntu on Windows, it is
|
||||
possible to run Jekyll as a non-superuser and without having to install
|
||||
gems to system-wide locations by adding the following lines to the end
|
||||
of your `.bashrc` file:
|
||||
|
||||
```
|
||||
# Ruby exports
|
||||
|
||||
export GEM_HOME=$HOME/gems
|
||||
export PATH=$HOME/gems/bin:$PATH
|
||||
```
|
||||
|
||||
This tells `gem` to place its gems within the user's home folder,
|
||||
not in a system-wide location, and adds the local `jekyll` command to the
|
||||
user's `PATH` ahead of any system-wide paths.
|
||||
|
||||
This is also useful for many shared webhosting services, where user accounts
|
||||
have only limited privileges. Adding these exports to `.bashrc` before running
|
||||
`gem install jekyll bundler` allows a complete non-`sudo` install of Jekyll.
|
||||
|
||||
To activate the new exports, either close and restart Bash, logout and
|
||||
log back into your shell account, or run `. .bashrc` in the
|
||||
currently-running shell.
|
||||
|
||||
If you see the following error when running the `jekyll new` command,
|
||||
you can solve it by using the above-described procedure:
|
||||
|
||||
```sh
|
||||
jekyll new test
|
||||
|
||||
Running bundle install in /home/user/test...
|
||||
|
||||
Your user account isn't allowed to install to the system RubyGems.
|
||||
You can cancel this installation and run:
|
||||
|
||||
bundle install --path vendor/bundle
|
||||
|
||||
to install the gems into ./vendor/bundle/, or you can enter your password
|
||||
and install the bundled gems to RubyGems using sudo.
|
||||
|
||||
Password:
|
||||
```
|
||||
|
||||
Once this is done, the `jekyll new` command should work properly for
|
||||
your user account.
|
||||
|
||||
### Jekyll & Mac OS X 10.11
|
||||
|
||||
With the introduction of System Integrity Protection, several directories
|
||||
@@ -172,13 +227,13 @@ jekyll serve --baseurl '/blog'
|
||||
|
||||
… then make sure that you access the site at:
|
||||
|
||||
```sh
|
||||
```
|
||||
http://localhost:4000/blog/index.html
|
||||
```
|
||||
|
||||
It won’t work to just access:
|
||||
|
||||
```sh
|
||||
```
|
||||
http://localhost:4000/blog
|
||||
```
|
||||
|
||||
@@ -197,7 +252,7 @@ specified elsewhere.
|
||||
|
||||
**Note: From v3.3.0 onward, Jekyll does not process `node_modules` and certain subdirectories within `vendor`, by default. But, by having an `exclude:` array defined explicitly in the config file overrides this default setting, which results in some users to encounter an error in building the site, with the following error message:**
|
||||
|
||||
```
|
||||
```sh
|
||||
ERROR: YOUR SITE COULD NOT BE BUILT:
|
||||
------------------------------------
|
||||
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>':
|
||||
@@ -235,9 +290,8 @@ problems.
|
||||
|
||||
### Liquid
|
||||
|
||||
The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in
|
||||
templates. Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the
|
||||
following error:
|
||||
Liquid version 2.0 seems to break the use of `{{ "{{" }}` in templates.
|
||||
Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the following error:
|
||||
|
||||
```sh
|
||||
'{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
|
||||
|
||||
@@ -44,6 +44,10 @@ For `site.collections.myCollection` in Jekyll 2, you now do:
|
||||
|
||||
This is a bit cumbersome at first, but is easier than a big `for` loop.
|
||||
|
||||
### Textile support
|
||||
|
||||
We dropped native support for Textile, from now on you have to install our [jekyll-textile-converter](https://github.com/jekyll/jekyll-textile-converter) plugin to work with Textile files.
|
||||
|
||||
### Dropped dependencies
|
||||
|
||||
We dropped a number of dependencies the Core Team felt were optional. As such, in 3.0, they must be explicitly installed and included if you use any of the features. They are:
|
||||
|
||||
51
docs/_docs/upgrading/3-to-4.md
Normal file
51
docs/_docs/upgrading/3-to-4.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Upgrading from 3.x to 4.x
|
||||
permalink: /docs/upgrading/3-to-4/
|
||||
---
|
||||
|
||||
Upgrading from an older version of Jekyll? A few things have changed in Jekyll 4
|
||||
that you'll want to know about.
|
||||
|
||||
Before we dive in, you need to have at least Ruby 2.3.0 installed. Run the following
|
||||
in your terminal to check
|
||||
|
||||
```sh
|
||||
ruby -v
|
||||
```
|
||||
|
||||
If you're using Ruby >= 2.3.0, go ahead and fetch the latest version of Jekyll:
|
||||
|
||||
```sh
|
||||
gem update jekyll
|
||||
```
|
||||
|
||||
|
||||
### Template rendering
|
||||
|
||||
We've slightly altered the way Jekyll parses and renders your various templates to improve
|
||||
the overall build times. Jekyll now parses a template once, caches it internally and then
|
||||
renders the parsed template multiple times as required by your pages and documents.
|
||||
|
||||
The downside to this is that some of the community-authored plugins may not work as they
|
||||
previously used to.
|
||||
|
||||
#### For Plugin-authors
|
||||
|
||||
* If your plugin depends on the following code: `site.liquid_renderer.file(path).parse(content)`,
|
||||
note that the return value (`template`, an instance of *`Liquid::Template`*), from that line will
|
||||
always be the **same object** for a given `path`. <br/>
|
||||
The *`template`* instance is then rendered as previously, with respect to the `payload` passed to it.
|
||||
You'll therefore have to ensure that *`payload`* is not memoized or cached in your plugin instance.
|
||||
|
||||
* If its a requirement that `template` you get from the above step *be different* at all times,
|
||||
you can invoke *`Liquid::Template`* directly:
|
||||
|
||||
|
||||
```diff
|
||||
- template = site.liquid_renderer.file(path).parse(content)
|
||||
+ template = Liquid::Template.parse(content)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
*Did we miss something? Please click "Improve this page" above and add a section. Thanks!*
|
||||
@@ -124,8 +124,7 @@ following is a reference of the available data.
|
||||
|
||||
A list of all <a href="/docs/static-files/">static files</a> (i.e.
|
||||
files not processed by Jekyll's converters or the Liquid renderer).
|
||||
Each file has three properties: <code>path</code>,
|
||||
<code>modified_time</code> and <code>extname</code>.
|
||||
Each file has five properties: <code>path</code>, <code>modified_time</code>, <code>name</code>, <code>basename</code> and <code>extname</code>.
|
||||
|
||||
</p></td>
|
||||
</tr>
|
||||
@@ -250,7 +249,7 @@ following is a reference of the available data.
|
||||
<td><p><code>page.excerpt</code></p></td>
|
||||
<td><p>
|
||||
|
||||
The un-rendered excerpt of the Page.
|
||||
The un-rendered excerpt of a document.
|
||||
|
||||
</p></td>
|
||||
</tr>
|
||||
|
||||
@@ -7,13 +7,72 @@ While Windows is not an officially-supported platform, it can be used to run Jek
|
||||
|
||||
|
||||
## Installing Jekyll
|
||||
The easiest way to run Jekyll is by using the [RubyInstaller][] for Windows.
|
||||
|
||||
If you are using Windows 10 Anniversary Update, the easiest way to run Jekyll is by [installing][WSL-Guide] the new Bash on Ubuntu on Windows.
|
||||
### Installation via RubyInstaller
|
||||
|
||||
[RubyInstaller][] is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
|
||||
We only cover RubyInstaller-2.4 and newer here, older versions need to [install the Devkit][Devkit-install] manually.
|
||||
|
||||
1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads][RubyInstaller-downloads].
|
||||
Use default options for installation.
|
||||
2. Open a new command prompt window from the start menu, so that changes to the `PATH` environment variable becomes effective.
|
||||
Install Jekyll and Bundler via: `gem install jekyll bundler`
|
||||
3. Check if Jekyll installed properly: `jekyll -v`
|
||||
|
||||
That's it, you're ready to install our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website`.
|
||||
|
||||
[RubyInstaller]: https://rubyinstaller.org/
|
||||
[RubyInstaller-downloads]: https://rubyinstaller.org/downloads/
|
||||
[Devkit-install]: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
|
||||
|
||||
|
||||
### Installation via Bash on Windows 10
|
||||
### Encoding
|
||||
|
||||
*Note:* You must have [Bash on Ubuntu on Windows][BASH-WSL] enabled.
|
||||
If you use UTF-8 encoding, make sure that no `BOM` header characters exist in your files or very, very bad things will happen to
|
||||
Jekyll. This is especially relevant when you're running Jekyll on Windows.
|
||||
|
||||
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
|
||||
|
||||
```sh
|
||||
chcp 65001
|
||||
```
|
||||
|
||||
|
||||
### Time-Zone Management
|
||||
|
||||
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
|
||||
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
|
||||
|
||||
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database][IANA-database].
|
||||
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
|
||||
|
||||
```ruby
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
```
|
||||
|
||||
[IANA-database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
### Auto Regeneration
|
||||
|
||||
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
|
||||
|
||||
Add the following to the Gemfile for your site if you have issues with auto-regeneration on Windows alone:
|
||||
|
||||
```ruby
|
||||
gem 'wdm', '~> 0.1.1' if Gem.win_platform?
|
||||
```
|
||||
|
||||
You have to use a [Ruby+Devkit](https://rubyinstaller.org/downloads/) version of the RubyInstaller.
|
||||
|
||||
|
||||
## Installation via Bash on Windows 10
|
||||
|
||||
If you are using Windows 10 version 1607 or later, another option to run Jekyll is by [installing][WSL-Guide] the Windows Subsystem for Linux.
|
||||
|
||||
|
||||
*Note:* You must have [Windows Subsystem for Linux][BASH-WSL] enabled.
|
||||
|
||||
First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following:
|
||||
|
||||
@@ -30,7 +89,7 @@ Now we can install Ruby. To do this we will use a repository from [BrightBox](ht
|
||||
```sh
|
||||
sudo apt-add-repository ppa:brightbox/ruby-ng
|
||||
sudo apt-get update
|
||||
sudo apt-get install ruby2.3 ruby2.3-dev build-essential
|
||||
sudo apt-get install ruby2.4 ruby2.4-dev build-essential dh-autoreconf
|
||||
```
|
||||
|
||||
Next let's update our Ruby gems:
|
||||
@@ -51,6 +110,12 @@ Check if Jekyll installed properly by running:
|
||||
jekyll -v
|
||||
```
|
||||
|
||||
Configure the bundler/gem path so bundle doesn't prompt for sudo
|
||||
|
||||
```sh
|
||||
bundle config path vendor/bundle
|
||||
```
|
||||
|
||||
**And that's it!**
|
||||
|
||||
To start a new project named `my_blog`, just run:
|
||||
@@ -61,154 +126,13 @@ jekyll new my_blog
|
||||
|
||||
You can make sure time management is working properly by inspecting your `_posts` folder. You should see a markdown file with the current date in the filename.
|
||||
|
||||
**Note:** Bash on Ubuntu on Windows is still under development, so you may run into issues.
|
||||
<div class="note info">
|
||||
<h5>Non-superuser account issues</h5>
|
||||
<p>If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see the "Running Jekyll as Non-Superuser" instructions in <a href="/docs/troubleshooting/#no-sudo">Troubleshooting</a>.</p>
|
||||
</div>
|
||||
|
||||
**Note:** Bash on Ubuntu on Windows is still under development, so you may run into issues.
|
||||
|
||||
[WSL-Guide]: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
|
||||
[BASH-WSL]: https://msdn.microsoft.com/en-us/commandline/wsl/about
|
||||
|
||||
|
||||
### Installation via RubyInstaller
|
||||
|
||||
[RubyInstaller][] is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
|
||||
|
||||
1. Download and Install a package manager version from [RubyInstaller Downloads][RubyInstaller-downloads].
|
||||
2. Install Jekyll and Bundler via a command prompt window: `gem install jekyll bundler`
|
||||
3. Check if Jekyll installed properly: `jekyll -v`
|
||||
|
||||
[RubyInstaller]: https://rubyinstaller.org/
|
||||
[RubyInstaller-downloads]: https://rubyinstaller.org/downloads/
|
||||
|
||||
|
||||
### Installation via Chocolatey
|
||||
|
||||
A quick way to install Jekyll using Chocolatey is to follow the [installation instructions by David Burela](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/):
|
||||
|
||||
1. Install a package manager for Windows called [Chocolatey][]
|
||||
2. Install Ruby via Chocolatey: `choco install ruby -y`
|
||||
3. Reopen a command prompt and install Jekyll: `gem install jekyll`
|
||||
|
||||
Updates in the infrastructure of Ruby may cause SSL errors when attempting to use `gem install` with versions of the RubyGems package older than 2.6. (The RubyGems package installed via the Chocolatey tool is version 2.3) If you have installed an older version, you can update the RubyGems package using the directions [here][ssl-certificate-update].
|
||||
|
||||
[ssl-certificate-update]: http://guides.rubygems.org/ssl-certificate-update/#installing-using-update-packages
|
||||
|
||||
|
||||
### Installing *github-pages* via Chocolatey
|
||||
|
||||
This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.
|
||||
|
||||
|
||||
#### Install Ruby and Ruby development kit
|
||||
|
||||
Open a command prompt and execute the following commands:
|
||||
|
||||
* `choco install ruby -version 2.2.4`
|
||||
* `choco install ruby2.devkit` - _needed for compilation of json gem_
|
||||
|
||||
|
||||
#### Configure Ruby development kit
|
||||
|
||||
The development kit did not set the environment path for Ruby so we need to do it.
|
||||
|
||||
* Open command prompt in `C:\tools\DevKit2`
|
||||
* Execute `ruby dk.rb init` to create a file called `config.yml`
|
||||
* Edit the `config.yml` file and include the path to Ruby `- C:/tools/ruby22`
|
||||
* Execute the following command to set the path: `ruby dk.rb install`
|
||||
|
||||
|
||||
#### Nokogiri gem installation
|
||||
|
||||
This gem is also needed in the github-pages and to get it running on Windows x64 we have to install a few things.
|
||||
|
||||
**Note:** In the current [pre release][nokogiriFails] it works out of the box with Windows x64 but this version is not referenced in the github-pages.
|
||||
|
||||
```sh
|
||||
choco install libxml2 -Source "https://www.nuget.org/api/v2/"
|
||||
|
||||
choco install libxslt -Source "https://www.nuget.org/api/v2/"
|
||||
|
||||
choco install libiconv -Source "https://www.nuget.org/api/v2/
|
||||
|
||||
gem install nokogiri --^
|
||||
--with-xml2-include=C:\Chocolatey\lib\libxml2.2.7.8.7\build\native\include^
|
||||
--with-xml2-lib=C:\Chocolatey\lib\libxml2.redist.2.7.8.7\build\native\bin\v110\x64\Release\dynamic\cdecl^
|
||||
--with-iconv-include=C:\Chocolatey\lib\libiconv.1.14.0.11\build\native\include^
|
||||
--with-iconv-lib=C:\Chocolatey\lib\libiconv.redist.1.14.0.11\build\native\bin\v110\x64\Release\dynamic\cdecl^
|
||||
--with-xslt-include=C:\Chocolatey\lib\libxslt.1.1.28.0\build\native\include^
|
||||
--with-xslt-lib=C:\Chocolatey\lib\libxslt.redist.1.1.28.0\build\native\bin\v110\x64\Release\dynamic
|
||||
```
|
||||
|
||||
#### Install github-pages
|
||||
|
||||
* Open command prompt and install [Bundler][]: `gem install bundler`
|
||||
* Create a file called `Gemfile` without any extension in your root directory of your blog
|
||||
* Copy & paste the two lines into the file:
|
||||
|
||||
|
||||
```ruby
|
||||
source 'https://rubygems.org'
|
||||
gem 'github-pages', group: :jekyll_plugins
|
||||
```
|
||||
|
||||
* **Note:** We use an unsecure connection because SSL throws exceptions in the version of Ruby
|
||||
* Open a command prompt, target your local blog repository root, and install github-pages: `bundle install`
|
||||
|
||||
|
||||
After this process you should have github-pages installed on your system and you can host your blog again with `jekyll s`.
|
||||
There will be a warning on startup that you should include `gem 'wdm', '>= 0.1.0' if Gem.win_platform?` to your `Gemfile` but I could not get `jekyll s` working if I include that line so for the moment I ignore that warning.
|
||||
|
||||
In the future the installation process of the github-pages should be as simple as the setup of the blog. But as long as the new version of the Nokogiri ([v1.6.8][nokogiriReleases]) is not stable and referenced, it is work to get it up and running on Windows.
|
||||
|
||||
[jwillmerPost]: https://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46 "Installation instructions by Jens Willmer"
|
||||
[Chocolatey]: https://chocolatey.org/install "Package manager for Windows"
|
||||
[nokogiriFails]: https://github.com/sparklemotion/nokogiri/issues/1456#issuecomment-206481794 "Nokogiri fails to install on Ruby 2.3 for Windows"
|
||||
[Bundler]: http://bundler.io/ "Ruby Dependencie Manager"
|
||||
[nokogiriReleases]: https://github.com/sparklemotion/nokogiri/releases "Nokogiri Releases"
|
||||
|
||||
For a more conventional way of installing Jekyll you can follow this [complete guide to install Jekyll 3 on Windows by Sverrir Sigmundarson][windows-installjekyll3].
|
||||
|
||||
Optionally you can use [Autoinstall Jekyll for Windows][fastjekyll-autoinstall].
|
||||
|
||||
[windows-installjekyll3]: https://labs.sverrirs.com/jekyll/
|
||||
[fastjekyll-autoinstall]: https://github.com/KeJunMao/fastjekyll#autoinstall-jekyll-for-windows
|
||||
|
||||
|
||||
## Encoding
|
||||
|
||||
If you use UTF-8 encoding, make sure that no `BOM` header characters exist in your files or very, very bad things will happen to
|
||||
Jekyll. This is especially relevant when you're running Jekyll on Windows.
|
||||
|
||||
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
|
||||
|
||||
```sh
|
||||
chcp 65001
|
||||
```
|
||||
|
||||
|
||||
## Time-Zone Management
|
||||
|
||||
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
|
||||
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
|
||||
|
||||
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database][IANA-database].
|
||||
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
|
||||
|
||||
```ruby
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
```
|
||||
|
||||
[IANA-database]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
|
||||
## Auto Regeneration
|
||||
|
||||
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
|
||||
|
||||
Add the following to the Gemfile for your site if you have issues with auto-regeneration on Windows alone:
|
||||
|
||||
```ruby
|
||||
gem 'wdm', '~> 0.1.1' if Gem.win_platform?
|
||||
```
|
||||
|
||||
You may first have to download and install the [Ruby DevKit](https://rubyinstaller.org/downloads/) by following [the instructions here](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit).
|
||||
|
||||
@@ -1,26 +1,9 @@
|
||||
{% if site.gauges_id %}
|
||||
<!-- Gauges (http://get.gaug.es/) -->
|
||||
<script>
|
||||
var _gauges = _gauges || [];
|
||||
(function() {
|
||||
var t = document.createElement('script');
|
||||
t.type = 'text/javascript';
|
||||
t.async = true;
|
||||
t.id = 'gauges-tracker';
|
||||
t.setAttribute('data-site-id', '{{ site.gauges_id }}');
|
||||
t.src = '//secure.gaug.es/track.js';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(t, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% if site.google_analytics_id %}
|
||||
<!-- Google Analytics (https://www.google.com/analytics) -->
|
||||
<script>
|
||||
!function(j,e,k,y,l,L){j.GoogleAnalyticsObject=y,j[y]||(j[y]=function(){
|
||||
(j[y].q=j[y].q||[]).push(arguments)}),j[y].l=+new Date,l=e.createElement(k),
|
||||
L=e.getElementsByTagName(k)[0],l.src='//www.google-analytics.com/analytics.js',
|
||||
L=e.getElementsByTagName(k)[0],l.src='https://www.google-analytics.com/analytics.js',
|
||||
L.parentNode.insertBefore(l,L)}(window,document,'script','ga');
|
||||
|
||||
ga('create', '{{ site.google_analytics_id }}', 'jekyllrb.com');
|
||||
|
||||
@@ -11,5 +11,15 @@
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="unit two-thirds align-right center-on-mobiles">
|
||||
<p>
|
||||
Sponsored by
|
||||
{% for sponsor in site.data.sponsors %}
|
||||
<a href="{{ sponsor.url }}" style="margin-left: 10px;">
|
||||
<img src="{{ sponsor.image }}" height="{{ sponsor.height }}" width="{{ sponsor.width }}" alt="{{ sponsor.name }}">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
<span class="post-date">
|
||||
{{ post.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ post.author }}" class="post-author">
|
||||
{% assign author = post.author %}
|
||||
{% assign author = post.author %}
|
||||
<a href="https://github.com/{{ author }}" class="post-author">
|
||||
{% avatar user=author size=24 %}
|
||||
{{ post.author }}
|
||||
{{ author }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
|
||||
{% feed_meta %}
|
||||
<link rel="alternate" type="application/atom+xml" title="Recent commits to Jekyll’s master branch" href="{{ site.repository }}/commits/master.atom">
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
|
||||
<link rel="stylesheet" href="/css/screen.css">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
@@ -19,9 +19,10 @@ layout: news
|
||||
<span class="post-date">
|
||||
{{ page.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ page.author }}" class="post-author">
|
||||
{% avatar {{ page.author}} size=24 %}
|
||||
{{ page.author }}
|
||||
{% assign author = page.author %}
|
||||
<a href="https://github.com/{{ author }}" class="post-author">
|
||||
{% avatar user=author size=24 %}
|
||||
{{ author }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Diversity in Open Source, and Jekyll's role in it"
|
||||
date: 2017-10-19 21:33:00 +0200
|
||||
author: pup
|
||||
author: oe
|
||||
categories: [community]
|
||||
---
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: "Jekyll 3.7.1 Released"
|
||||
title: "Jekyll 3.7.2 Released"
|
||||
date: 2018-01-25 22:22:22 +0530
|
||||
author: ashmaroli
|
||||
version: 3.7.1
|
||||
version: 3.7.2
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
@@ -10,7 +10,8 @@ Close on the heels of shipping 3.7.0, we were informed of a couple of
|
||||
regressions due to the changes made in that release. In due time, Team Jekyll
|
||||
set out to address those issues as early as possible.
|
||||
|
||||
Days later here we're, announcing 3.7.1 that fixes numerous issues! :tada:
|
||||
Days later here we're, announcing 3.7.2 (sorry for skipping 3.7.1,
|
||||
RubyGems didn't want to play nice) that fixes numerous issues! :tada:
|
||||
The highlights being:
|
||||
|
||||
* A major regression in 3.7.0 was that when a Front Matter Default was
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
layout: news_item
|
||||
title: "Meet Jekyll's New Lead Developer"
|
||||
date: "2018-02-19 20:48:09 -0500"
|
||||
author: parkr
|
||||
categories: [team]
|
||||
---
|
||||
|
||||
Jekyll has a new Lead Developer: [Olivia](https://liv.cat/)!
|
||||
|
||||
After over 5 years of leading Jekyll, many releases from 0.12.1 to 3.6.0, and
|
||||
countless conversations in GitHub Issues, Pull Requests, Jekyll Talk, and
|
||||
more, I am passing on the torch as Lead Developer of Jekyll.
|
||||
|
||||
Olivia has been working with the Jekyll community for some time now. You
|
||||
may have seen her around in issues and pull requests on the various Jekyll
|
||||
repositories. She started as a contributor, then joined the Core team as our
|
||||
community lead. Olivia joined the Jekyll Core Team with experience in the
|
||||
Node.js community, both online and as a volunteer organizer with JSConf EU.
|
||||
|
||||
In my conversations with Olivia, it is clear that Jekyll's vision of
|
||||
simplicity for the user ([no magic!](/philosophy#1-no-magic)) and letting
|
||||
users' [content be king](/philosophy#3-content-is-king) will remain a top
|
||||
priority. In just the last few weeks as the transition has been occurring,
|
||||
we have seen some incredible work on performance that will make future
|
||||
versions of Jekyll work better at scale. She will be prioritizing work on
|
||||
innovative improvements to make Jekyll that much better for all of us.
|
||||
Olivia balances an eye for quality with the need for shipping well.
|
||||
|
||||
When Tom Preston-Werner met me at GitHub HQ 2.0 in January 2013 to pass on
|
||||
the torch, I could never have dreamed of all the amazing experiences this
|
||||
community would share with me over the next 5 years. From visiting @qrush
|
||||
in Buffalo, NY for a hack night on Jekyll to attending a Jekyll planning
|
||||
session hosted by @benbalter at GitHub to Google Summer of Code which gave
|
||||
us jekyll-admin, I am eternally grateful to all of you for the opportunity
|
||||
to lead this excellent community. I'm confident Olivia will continue to
|
||||
lead Jekyll to even greater heights.
|
||||
|
||||
As always, Happy Jekylling!
|
||||
|
||||
Parker
|
||||
|
||||
*Curious about who else runs this show? [Check out our excellent team.](/team/)*
|
||||
19
docs/_posts/2018-02-25-jekyll-3-7-3-released.markdown
Normal file
19
docs/_posts/2018-02-25-jekyll-3-7-3-released.markdown
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: 'Jekyll 3.7.3 Released'
|
||||
date: 2018-02-25 13:02:08 +0530
|
||||
author: ashmaroli
|
||||
version: 3.7.3
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Hello Jekyllers!! :wave:
|
||||
|
||||
We're pleased to announce the release of `v3.7.3` which fixes a bug one might encounter while using `Jekyll - 3.7.x` along with a
|
||||
Jekyll plugin that in turn uses the `I18n` library.
|
||||
|
||||
When [v3.7.0]({% link _posts/2018-01-02-jekyll-3-7-0-released.md %}) enhanced our `slugify` filter with a `latin` option, we also
|
||||
hardcoded a default fallback locale for the `I18n` library to avoid an exception raised in the event the library fails to find
|
||||
any locale. This led to issues with third-party i18n plugins for Jekyll, especially since the default locale got assigned before
|
||||
the plugin was loaded, irrespective of whether the `slugify` filter was used.
|
||||
|
||||
Jekyll will henceforth set the default locale if and only if necessary.
|
||||
28
docs/_posts/2018-03-14-development-update.md
Normal file
28
docs/_posts/2018-03-14-development-update.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: "Jekyll 4.0 is on the Horizon!"
|
||||
date: "2018-04-19 16:07:00 +0100"
|
||||
author: oe
|
||||
categories: [community]
|
||||
---
|
||||
|
||||
With the release of Jekyll 3.8.0, it's been 2 and a half years since the last major release. Jekyll 3.0.0 was released in late October of 2015! That's a long time ago, and we've been working towards the next major release of Jekyll for a couple of months now. Here's a small preview of what's to come:
|
||||
|
||||
- Dropping support for Ruby 2.1 and 2.2. Both versions have reached their EOL period.
|
||||
- Dropping Pygments as a dependency. We're already defaulting to Rouge, and this removes the implicit Python dependency. (finally!)
|
||||
- Making the `link` tag use relative URLs. This is a big breaking change, but it's the cleaner solution.
|
||||
|
||||
We're open to more ideas, though. If the development cost isn't too high, or if someone volunteers to take care of the implementation, it's likely that your suggestion might make it into Jekyll 4.0. Head over to this [issue] for more details. Some interesting topics might be improving Internationalization support in Jekyll, creating convenience Liquid tags, et cetera.
|
||||
|
||||
That being said, the development period of version 4.0 begins _now_. This means a couple of things:
|
||||
|
||||
- New features will only be implemented in Jekyll 4.0. There will be no 3.9.0 or the like.
|
||||
- Same with bug fixes, unless they concern something introduced in Jekyll 3.7 or 3.8, in which case we will backport the fixes and release a patch version.
|
||||
- Now is a great time to finally take on the feature you've wanted to see in Jekyll for ages! Just open an issue or experiment with the code to get going!
|
||||
|
||||
As for a release date, we're currently aiming for late summer, around September or so. However, keep in mind that this project is purely volunteer-run, and as such, delays might occur and we might not hit that release date.
|
||||
|
||||
Finally, this is a great time for newcomers to open-source to make their first contribution. We'll be doing our best to mark recommended contributions and create newcomer-friendly issues, as well as to provide mentoring throughout the contribution process (although we'd like to think that we're already pretty proficient at that). So if you've always been hestitant about contributing to a large open-source project, Jekyll is a good place to start!
|
||||
|
||||
Happy Jekylling! :wave:
|
||||
|
||||
[issue]: https://github.com/jekyll/jekyll/issues/6948
|
||||
43
docs/_posts/2018-03-15-jekyll-3-8-0-released.markdown
Normal file
43
docs/_posts/2018-03-15-jekyll-3-8-0-released.markdown
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: 'Jekyll 3.8.0 Released'
|
||||
date: 2018-04-19 19:45:15 +0530
|
||||
author: ashmaroli
|
||||
version: 3.8.0
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Aloha Jekyllers!! :wave:
|
||||
|
||||
After months of toiling on the codebase and shipping a couple of release-candidates, the Jekyll Team is delighted to finally
|
||||
present `v3.8.0`, packed with optimizations, improvements, some new features and a couple of bug-fixes. Yay!!!
|
||||
|
||||
Under the hood, Jekyll has undergone many minor changes that will allow it to run more performantly in the coming years. :smiley:
|
||||
Rest assured, our users should see minor improvements in their site's build times.
|
||||
|
||||
Speaking of improvements, users running a site containing a huge amount of posts or those who like to use our `where` filter
|
||||
frequently in a single template, are going to see a massive reduction in their total build times!! :tada:
|
||||
|
||||
Hold on, this version is not just about optimizations, there are some new features as well..:
|
||||
* Detect non-existent variables and filters specified in a template by enabling `strict_variables` and `strict_filters` under the
|
||||
`liquid` key in your config file.
|
||||
* Allow *date filters* to output ordinal days.
|
||||
* `jekyll doctor` now warns you if you have opted for custom `collections_dir` but placed `_posts` directory outside that
|
||||
directory.
|
||||
|
||||
..and yes, a couple of bug-fixes, notably:
|
||||
* Jekyll now handles future-dated documents properly.
|
||||
* Jekyll is able to handle Liquid blocks intelligently in excerpts.
|
||||
* A few methods that were *not meant to be publically accessible* have been entombed properly.
|
||||
* A few bugs that still plagued our `collections_dir` feature from `v3.7` got crushed.
|
||||
|
||||
As always, the full list of changes since last release can be viewed [here](/docs/history/#v3-8-0).
|
||||
|
||||
A big thanks to the following people who contributed to our repository with pull-requests that improved our codebase, documentation
|
||||
and tests:
|
||||
|
||||
Ana María Martínez Gómez, Antonio Argote, Ashwin Maroli, Awjin Ahn, Ben Balter, Benjamin Høegh, Christian Oliff, Damien Solodow,
|
||||
David Zhang, Delson Lima, Eric Cornelissen, Florian Thomas, Frank Taillandier, Heinrich Hartmann, Jakob Vad Nielsen, John Eismeier,
|
||||
Kacper Duras, KajMagnus, Mario Cekic, Max Vilimpoc, Michael H, Mike Kasberg, Parker Moore, Pat Hawks, Paweł Kuna, Robert Riemann,
|
||||
Roger Rohrbach, Semen Zhydenko, Stefan Dellmuth, Tim Carry, olivia, and steelman.
|
||||
|
||||
Happy Jekylling!! :sparkles:
|
||||
20
docs/_posts/2018-05-01-jekyll-3-8-1-released.markdown
Normal file
20
docs/_posts/2018-05-01-jekyll-3-8-1-released.markdown
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: 'Jekyll 3.8.1 Released'
|
||||
date: 2018-05-01 11:56:01 -0500
|
||||
author: pathawks
|
||||
version: 3.8.1
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Happy May Day :tada:
|
||||
|
||||
The Jekyll team is happy to announce the release of `v3.8.1`, which fixes
|
||||
a couple of bugs that were introduced two weeks ago in `v3.8.0`. If you have
|
||||
experienced trouble regarding post excerpts or non-published posts, this release
|
||||
should be the remedy. Thanks to @Chaosed0 and @domLocalHeroes for originally
|
||||
reporting these issues, and to @ashmaroli for fixing them so quickly.
|
||||
|
||||
As a reminder, we have started work on Jekyll 4.0. If there are any
|
||||
features that you would love to see added to Jekyll, or any pain points you
|
||||
would like to see removed, please do add your ideas to the [Jekyll 4.0 idea
|
||||
list](https://github.com/jekyll/jekyll/issues/6948).
|
||||
19
docs/_posts/2018-05-18-jekyll-3-8-2-released.markdown
Normal file
19
docs/_posts/2018-05-18-jekyll-3-8-2-released.markdown
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: 'Jekyll 3.8.2 Released'
|
||||
date: 2018-05-19 10:30:00 -0500
|
||||
author: pathawks
|
||||
version: 3.8.2
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Hello Jekyllers!!
|
||||
|
||||
Today we are releasing `v3.8.2`, which fixes the way Jekyll generates excerpts
|
||||
for posts when the first paragraph of the post contains Liquid tags that take
|
||||
advantage of [Liquid's whitespace control feature][Liquid whitespace].
|
||||
|
||||
Big thanks to @kylebarbour, who first reported this issue and also very quickly
|
||||
submitted a fix. Also thanks to @nickskalkin for making sure that we are using
|
||||
the latest version of Rubocop to lint our code.
|
||||
|
||||
[Liquid whitespace]: https://shopify.github.io/liquid/basics/whitespace/
|
||||
13
docs/_posts/2018-06-04-jekyll-3-8-3-released.markdown
Normal file
13
docs/_posts/2018-06-04-jekyll-3-8-3-released.markdown
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: 'Jekyll 3.8.3 Released'
|
||||
date: 2018-06-05 09:00:00 -0500
|
||||
author: pathawks
|
||||
version: 3.8.3
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
This release fixes a regression in 3.8 where collections with `published: false`
|
||||
do not show when using the `--unpublished` flag.
|
||||
|
||||
Thanks to @philipbelesky for reporting and fixing this issue; collections with
|
||||
`published: false` now behave the same way as Posts.
|
||||
68
docs/_posts/2018-08-01-jekyll-sponsoring.markdown
Normal file
68
docs/_posts/2018-08-01-jekyll-sponsoring.markdown
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
title: "Sponsoring Jekyll's development"
|
||||
date: 2018-08-01 15:00:00 +0200
|
||||
author: oe
|
||||
categories: [community]
|
||||
---
|
||||
|
||||
_(TL;DR: We're open for sponsorships on our [OpenCollective page](https://opencollective.com/jekyll))_
|
||||
|
||||
Hi Jekyllers,
|
||||
|
||||
As you may know, Jekyll is a completely free and open source project. We offer our
|
||||
software and its related plugins and documentation at no cost because we believe
|
||||
that good software should not cost anything. We're not planning on changing that,
|
||||
but today I want to talk about a different monetary aspect of open source.
|
||||
|
||||
Open source developers being paid for the work they do is a rare sight. Most open source
|
||||
software is effectively the result of hundreds and thousands of hours of free labor provided
|
||||
by individuals who are passionate enough to work outside of their day job to create
|
||||
software that, ironically, is being used by almost every company that offers
|
||||
digital services. It's a problem that has gotten more attention in recent years, with
|
||||
the open source community becoming more diverse and more and more companies actively
|
||||
investing in providing monetary support for open source developers.
|
||||
|
||||
Jekyll has always been a product of volunteers. Rarely has someone been paid to implement
|
||||
a certain plugin or feature. Today, we're excited to announce that we will finally
|
||||
be able to fund our contributors! __We are opening an OpenCollective to receive
|
||||
individual and corporate sponsorships__. This is not unheard of, [Hugo](http://gohugo.io)
|
||||
is also funded by sponsorships, as are many other similar projects, such as
|
||||
[webpack](https://opencollective.com/webpack), [Babel](https://opencollective.com/babel) or
|
||||
[RuboCop](https://opencollective.com/rubocop).
|
||||
|
||||
OpenCollective is a service that makes it easy for open source projects to receive funding
|
||||
from individuals and companies alike. It's specifically designed for open source and
|
||||
many other projects already use it for funding.
|
||||
|
||||
Sponsoring is, for us, a method to finally realize some of the more ambitious goals we've had
|
||||
with the project for years. The closest thing we want to realize is to __release Jekyll 4.0, and
|
||||
to make it as polished as we can__. In the future, we would also like to work on other things that
|
||||
will improve the Jekyll ecosystem. Here's a couple of ideas:
|
||||
|
||||
- Create a comprehensive official plugin and theme directory site
|
||||
- Improve tooling built around measuring and improving Jekyll's performance
|
||||
- Improve maintenance for official plugins
|
||||
- Including the community into official decisions; making Jekyll more friendly to folks in the community
|
||||
|
||||
Again, these are just some ideas, but with the help of sponsoring, they are now one step closer
|
||||
to being realized :heart:
|
||||
|
||||
<div align="center">
|
||||
<img src="/img/forestry-logo.png" width="300" />
|
||||
</div>
|
||||
|
||||
With that, we would like to announce our very first sponsor: [__Forestry.io__](https://forestry.io)! Forestry is
|
||||
a CMS that integrates with your Jekyll sites and lets you update content using a beautiful
|
||||
interface, and then automatically commits it back to your GitHub repository. We're excited to have
|
||||
them on board on a new, exciting step of our journey.
|
||||
|
||||
Will anything change for Jekyll users? The answer is no - this step does not impact the Jekyll software
|
||||
in any aspect. In fact, you might see positive changes, such as more features and better
|
||||
performance. Surprisingly, that's what happens when you properly fund people for their work!
|
||||
|
||||
If you have been a long time user for Jekyll and would like to give something back to the project,
|
||||
you can consider a small monthly donation to our [OpenCollective page](http://opencollective.com/jekyll).
|
||||
If your company heavily relies on Jekyll, do consider sponsoring us! Contact me at
|
||||
`olivia at fastmail dot com` and we'll figure something out together.
|
||||
|
||||
Thanks for sticking with us, and happy Jekylling! :tada:
|
||||
@@ -224,8 +224,7 @@ footer {
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: 8px;
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
opacity: .8;
|
||||
padding: 1px;
|
||||
|
||||
@@ -53,7 +53,7 @@ More info on configuring Apache Error Pages can found in [official documentation
|
||||
|
||||
The procedure is just as simple as configuring Apache servers, but slightly different.
|
||||
|
||||
Add the following to the nginx configuration file, `nginx.conf`, which is usually located inside `/etc/nginx/` or `/etc/nginx/conf/`:
|
||||
The nginx configuration file depends on the system in which it is installed. In most systems, it is the `nginx.conf` file, which is usually located inside `/etc/nginx/` or `/etc/nginx/conf/`. However, in other systems like Ubuntu, you would have to look for a `default` nginx configuration file, containing server related information, which is usually located inside `/etc/nginx/sites-available/` or `/etc/nginx/sites-enabled/`. Add the following to your nginx configuration file, _i.e._ either to `nginx.conf` file or to `default` file:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
@@ -63,5 +63,11 @@ server {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If the `server` block already exists, only add the code inside the `server` block given above.
|
||||
The `location` directive prevents users from directly browsing the 404.html page.
|
||||
|
||||
More info on nginx error page can be found on [nginx official documentation](http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
|
||||
|
||||
<p class="note warning">
|
||||
Proceed with caution while editing the configuration file.
|
||||
</p>
|
||||
|
||||
@@ -261,7 +261,7 @@ toc2:
|
||||
{% if item.subfolderitems[0] %}
|
||||
<ul>
|
||||
{% for entry in item.subfolderitems %}
|
||||
<li><a href="{{ entry.url }}">{{ entry.page }}</a></li>
|
||||
<li><a href="{{ entry.url }}">{{ entry.page }}</a>
|
||||
{% if entry.subsubfolderitems[0] %}
|
||||
<ul>
|
||||
{% for subentry in entry.subsubfolderitems %}
|
||||
@@ -269,6 +269,7 @@ toc2:
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -396,9 +397,11 @@ In addition to inserting items from the YAML data file into your list, you also
|
||||
</style>
|
||||
|
||||
<div class="highlight result">
|
||||
<li class=""><a href="#">Introduction</a></li>
|
||||
<li class=""><a href="#">Configuration</a></li>
|
||||
<li class="active"><a href="#">Deployment</a></li>
|
||||
<ul>
|
||||
<li class=""><a href="#">Introduction</a></li>
|
||||
<li class=""><a href="#">Configuration</a></li>
|
||||
<li class="active"><a href="#">Deployment</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
In this case, assume `Deployment` is the current page.
|
||||
|
||||
106
docs/_tutorials/using-jekyll-with-bundler.md
Normal file
106
docs/_tutorials/using-jekyll-with-bundler.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
layout: tutorials
|
||||
permalink: /tutorials/using-jekyll-with-bundler/
|
||||
title: Using Jekyll with Bundler
|
||||
---
|
||||
|
||||
> Bundler provides a consistent environment for Ruby projects by tracking and
|
||||
> installing the exact gems and versions that are needed.
|
||||
|
||||
[Bundler](https://bundler.io) can be a great tool to use with Jekyll. Because it
|
||||
tracks dependencies on a per-project basis, it is particularly useful if you
|
||||
need to run different versions of Jekyll in different projects, or if you don't
|
||||
want to install Jekyll at the system or user level. This tutorial will show you
|
||||
how to create a new Jekyll project using Bundler and without installing Jekyll
|
||||
outside the project.
|
||||
|
||||
## Before You Begin
|
||||
|
||||
To complete this tutorial, you'll need to have
|
||||
[Ruby](https://www.ruby-lang.org/en/) and [Bundler](https://bundler.io/)
|
||||
installed. You can find the installation instructions on their websites.
|
||||
|
||||
## Initialize Bundler
|
||||
|
||||
The first thing to do is create a new directory for your project and run
|
||||
`bundle init`. This creates a new Bundler project (by creating an empty
|
||||
Gemfile).
|
||||
|
||||
```sh
|
||||
mkdir my-jekyll-website
|
||||
cd my-jekyll-website
|
||||
bundle init
|
||||
```
|
||||
|
||||
## Configure Bundler
|
||||
|
||||
This step is optional, but encouraged. We're going to configure Bundler to install
|
||||
gems in the `./vendor/bundle/` project subdirectory. This allows us to install
|
||||
our dependencies in an isolated environment, ensuring they don't conflict with
|
||||
other gems on your system. If you skip this step, Bundler will install your
|
||||
dependencies globally on your system.
|
||||
|
||||
```sh
|
||||
bundle install --path vendor/bundle
|
||||
```
|
||||
|
||||
<div class="note info">
|
||||
<h5>Bundler Config is Persistent</h5>
|
||||
<p>
|
||||
This step is only required once per project. Bundler saves your config in
|
||||
<code>./.bundle/config</code>, so future gems will be installed to the same
|
||||
location.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Add Jekyll
|
||||
|
||||
Now, we're going to use Bundler to add Jekyll as a dependency of our new
|
||||
project. This command will add the Jekyll gem to our Gemfile and install it to
|
||||
the `./vendor/bundle/` folder.
|
||||
|
||||
```sh
|
||||
bundle add jekyll
|
||||
```
|
||||
|
||||
## Create A Jekyll Scaffold
|
||||
|
||||
Now that Jekyll is installed, we can use it to create the scaffolding for our
|
||||
site. We need the `--force` parameter because our folder isn't empty - it
|
||||
already has some Bundler files in it. We run the `bundle install` separately
|
||||
because Jekyll gets confused if the Gemfile already exists.
|
||||
|
||||
```sh
|
||||
bundle exec jekyll new --force --skip-bundle .
|
||||
bundle install
|
||||
```
|
||||
|
||||
## Serve the Site
|
||||
|
||||
Your new website is ready! You can serve the website with
|
||||
`bundle exec jekyll serve` and visit it at
|
||||
[http://127.0.0.1:4000](http://127.0.0.1:4000). From here, you're ready to
|
||||
continue developing the site on your own. All of the normal Jekyll commands are
|
||||
available to you, but you should prefix them with `bundle exec` so that Bundler
|
||||
runs the version of Jekyll that is installed in your project folder.
|
||||
|
||||
## Commit to Source Control
|
||||
|
||||
If you're storing your new site in version control, you'll want to ignore the
|
||||
`./vendor/` and `./.bundle/` folders since they contain user- or
|
||||
platform-specific information. New users will be able to install the correct
|
||||
dependencies based on `Gemfile` and `Gemfile.lock`, which should both be checked
|
||||
in. You can use this `.gitignore` to get started, if you want.
|
||||
|
||||
**.gitignore**
|
||||
|
||||
```
|
||||
# Ignore folders generated by Bundler
|
||||
vendor
|
||||
.bundle
|
||||
|
||||
# Ignore folders generated by Jekyll
|
||||
.sass-cache
|
||||
_site
|
||||
```
|
||||
|
||||
@@ -26,6 +26,10 @@ question!
|
||||
Get live support at **#jekyll** on **irc.freenode.net**, the official
|
||||
Jekyll IRC channel.
|
||||
|
||||
### [The Dev community](https://dev.to/)
|
||||
|
||||
[DEV’s jekyll tag](https://dev.to/t/jekyll) is a place to share Jekyll projects, articles and tutorials as well as start discussions and ask for feedback on Jekyll-related topics. Developers of all skill-levels are welcome to take part.
|
||||
|
||||
### View source
|
||||
|
||||
Learn from the source of others, you'll find plenty of [jekyll sites](https://github.com/topics/jekyll-site) and [jekyll themes](https://github.com/topics/jekyll-themes) carefully handcrafted on GitHub.
|
||||
|
||||
BIN
docs/img/cloudcannon-logo.png
Normal file
BIN
docs/img/cloudcannon-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
docs/img/forestry-logo.png
Normal file
BIN
docs/img/forestry-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
docs/img/siteleaf-logo.png
Normal file
BIN
docs/img/siteleaf-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -21,7 +21,7 @@ overview: true
|
||||
</div>
|
||||
<div class="unit one-third">
|
||||
<h2>Static</h2>
|
||||
<p><a href="https://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://redcloth.org/textile">Textile</a>), <a href="https://github.com/Shopify/liquid/wiki">Liquid</a>, HTML <span class="amp">&</span> CSS go in. Static sites come out ready for deployment.</p>
|
||||
<p><a href="https://daringfireball.net/projects/markdown/">Markdown</a>, <a href="https://github.com/Shopify/liquid/wiki">Liquid</a>, HTML <span class="amp">&</span> CSS go in. Static sites come out ready for deployment.</p>
|
||||
<a href="/docs/templates/">Jekyll template guide →</a>
|
||||
</div>
|
||||
<div class="unit one-third">
|
||||
@@ -45,7 +45,7 @@ overview: true
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">gem install jekyll bundler</span>
|
||||
<span class="command">gem install bundler jekyll</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.7.2
|
||||
3.8.3
|
||||
|
||||
47
docs/team/index.md
Normal file
47
docs/team/index.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: page
|
||||
title: The Jekyll Team
|
||||
---
|
||||
|
||||
## Core Team
|
||||
|
||||
*The Jekyll Core Team's responsibility is to ensure the development and
|
||||
community around the Jekyll ecosystem thrive.*
|
||||
|
||||
1. Olivia (@oe, Lead Developer)
|
||||
2. Frank (@DirtyF, Documentation)
|
||||
3. Pat (@pathawks)
|
||||
4. Matt (@mattr-)
|
||||
|
||||
## Plugin Core
|
||||
|
||||
*The Jekyll Plugin Core Team's responsibility is to ensure the development and
|
||||
community around the core plugins thrive. They also provide guidance in
|
||||
conversations about extensibility of Core Jekyll.*
|
||||
|
||||
1. Ashwin (@ashmaroli)
|
||||
2. Florian (@Crunch09)
|
||||
3. Mert (@mertkahyaoglu, jekyll-admin)
|
||||
4. Alfred Xing (@alfredxing)
|
||||
|
||||
## Affinity Team Captains
|
||||
|
||||
*The Affinity Team Captains lead [Jekyll's Affinity
|
||||
Teams](https://teams.jekyllrb.com/). Each team is tasked with maintaining
|
||||
and addressing issues for a specific aspect of Jekyll.*
|
||||
|
||||
1. [Build](https://github.com/orgs/jekyll/teams/build): @mattr-
|
||||
2. [Documentation](https://github.com/orgs/jekyll/teams/documentation): @DirtyF, @mattr-
|
||||
3. [Ecosystem](https://github.com/orgs/jekyll/teams/ecosystem): @pathawks
|
||||
4. [Performance](https://github.com/orgs/jekyll/teams/performance): @mattr-, @parkr
|
||||
5. [Stability](https://github.com/orgs/jekyll/teams/stability): @oe, @parkr
|
||||
6. [Windows](https://github.com/orgs/jekyll/teams/windows): @XhmikosR
|
||||
|
||||
## Emeritus Core Team Members
|
||||
|
||||
*Emeritus Core Team Members were once members of Jekyll's Core Team.*
|
||||
|
||||
1. Parker (@parkr)
|
||||
2. Tom (@mojombo)
|
||||
3. Nick (@qrush)
|
||||
4. Alfred (@alfredxing)
|
||||
@@ -116,7 +116,69 @@ Feature: Collections
|
||||
And the _site directory should exist
|
||||
And the "_site/puppies/fido.html" file should exist
|
||||
|
||||
Scenario: Hidden collection with document with future date
|
||||
Scenario: Access rendered collection with future dated document via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content |
|
||||
| Rover | 2007-12-31 | content for Rover. |
|
||||
| Fido | 2120-12-31 | content for Fido. |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: true
|
||||
"""
|
||||
And I have a "index.html" page that contains "Newest puppy: {% assign puppy = site.puppies.last %}{{ puppy.title }}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "Newest puppy: Fido" in "_site/index.html"
|
||||
But the "_site/puppies/fido.html" file should not exist
|
||||
When I run jekyll build --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "Newest puppy: Fido" in "_site/index.html"
|
||||
And the "_site/puppies/fido.html" file should exist
|
||||
|
||||
Scenario: Access rendered and published collection documents via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content | published |
|
||||
| Rover | 2007-12-31 | content for Rover. | true |
|
||||
| Figor | 2007-12-31 | content for Figor. | false |
|
||||
| Snowy | 2199-12-31 | content for Snowy. | true |
|
||||
| Hardy | 2199-12-31 | content for Hardy. | false |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: true
|
||||
"""
|
||||
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
But I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
And I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
But the "_site/puppies/snowy.html" file should exist
|
||||
|
||||
Scenario: Unrendered collection with future dated document
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content |
|
||||
@@ -139,6 +201,166 @@ Feature: Collections
|
||||
And the _site directory should exist
|
||||
And the "_site/puppies/fido.html" file should not exist
|
||||
|
||||
Scenario: Access unrendered collection with future dated document via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content |
|
||||
| Rover | 2007-12-31 | content for Rover. |
|
||||
| Fido | 2120-12-31 | content for Fido. |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: false
|
||||
"""
|
||||
And I have a "index.html" page that contains "Newest puppy: {% assign puppy = site.puppies.last %}{{ puppy.title }}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "Newest puppy: Fido" in "_site/index.html"
|
||||
But the "_site/puppies/fido.html" file should not exist
|
||||
When I run jekyll build --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "Newest puppy: Fido" in "_site/index.html"
|
||||
And the "_site/puppies/fido.html" file should not exist
|
||||
|
||||
Scenario: Access unrendered but publishable collection documents via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content | published |
|
||||
| Rover | 2007-12-31 | content for Rover. | true |
|
||||
| Figor | 2007-12-31 | content for Figor. | false |
|
||||
| Snowy | 2199-12-31 | content for Snowy. | true |
|
||||
| Hardy | 2199-12-31 | content for Hardy. | false |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: false
|
||||
"""
|
||||
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
But I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
And I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
|
||||
Scenario: Access rendered collection with future date and unpublished flag via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content | published |
|
||||
| Rover | 2007-12-31 | content for Rover. | true |
|
||||
| Figor | 2007-12-31 | content for Figor. | false |
|
||||
| Snowy | 2199-12-31 | content for Snowy. | true |
|
||||
| Hardy | 2199-12-31 | content for Hardy. | false |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: true
|
||||
"""
|
||||
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
But I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
And I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --unpublished
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --unpublished --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And the "_site/puppies/snowy.html" file should exist
|
||||
And the "_site/puppies/figor.html" file should exist
|
||||
And the "_site/puppies/hardy.html" file should exist
|
||||
|
||||
Scenario: Access unrendered collection with future date and unpublished flag via Liquid
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content | published |
|
||||
| Rover | 2007-12-31 | content for Rover. | true |
|
||||
| Figor | 2007-12-31 | content for Figor. | false |
|
||||
| Snowy | 2199-12-31 | content for Snowy. | true |
|
||||
| Hardy | 2199-12-31 | content for Hardy. | false |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: false
|
||||
"""
|
||||
And I have a "index.md" page that contains "{% for puppy in site.puppies %}<div>{{ puppy.title }}</div>{% endfor %}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
But I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should not see "<div>Figor</div>" in "_site/index.html"
|
||||
And I should not see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --unpublished
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
When I run jekyll build --unpublished --future
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<div>Rover</div>" in "_site/index.html"
|
||||
And I should see "<div>Snowy</div>" in "_site/index.html"
|
||||
And I should see "<div>Figor</div>" in "_site/index.html"
|
||||
But I should see "<div>Hardy</div>" in "_site/index.html"
|
||||
And the "_site/puppies/rover.html" file should not exist
|
||||
And the "_site/puppies/snowy.html" file should not exist
|
||||
And the "_site/puppies/figor.html" file should not exist
|
||||
And the "_site/puppies/hardy.html" file should not exist
|
||||
|
||||
Scenario: All the documents
|
||||
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
|
||||
And I have fixture collections
|
||||
|
||||
@@ -159,3 +159,127 @@ Feature: Collections Directory
|
||||
And I should see exactly "Nested Static content." in "_site/puppies/nested/static_file.txt"
|
||||
And the _site/gathering directory should not exist
|
||||
And the _site/_posts directory should not exist
|
||||
|
||||
Scenario: Rendered collection with a document that includes a relative document
|
||||
Given I have a _puppies directory
|
||||
And I have the following documents under the puppies collection:
|
||||
| title | date | content |
|
||||
| INTRO | 2007-12-31 | excerpt for all docs. |
|
||||
| Rover | 2007-12-31 | {% include_relative intro.md %} |
|
||||
And I have a _posts directory
|
||||
And I have the following post:
|
||||
| title | date | content |
|
||||
| Gathered Post | 2009-03-27 | Random Content. |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: true
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And I should see "excerpt for all docs." in "_site/puppies/rover.html"
|
||||
And I should see "Random Content." in "_site/2009/03/27/gathered-post.html"
|
||||
|
||||
Scenario: Rendered collection in custom collections_dir with a document that includes a relative document
|
||||
Given I have a collections/_puppies directory
|
||||
And I have the following documents under the "puppies" collection within the "collections" directory:
|
||||
| title | date | content |
|
||||
| INTRO | 2007-12-31 | excerpt for all docs. |
|
||||
| Rover | 2007-12-31 | {% include_relative intro.md %} |
|
||||
And I have a collections/_posts directory
|
||||
And I have the following post within the "collections" directory:
|
||||
| title | date | content |
|
||||
| Gathered Post | 2009-03-27 | Random Content. |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections:
|
||||
puppies:
|
||||
output: true
|
||||
|
||||
collections_dir: collections
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And the "_site/puppies/rover.html" file should exist
|
||||
And I should see "excerpt for all docs." in "_site/puppies/rover.html"
|
||||
And I should see "Random Content." in "_site/2009/03/27/gathered-post.html"
|
||||
|
||||
Scenario: Front matter defaults and custom collections directory
|
||||
Given I have a gathering/_players/managers directory
|
||||
And I have a gathering/_players/recruits directory
|
||||
And I have a gathering/_players/standby directory
|
||||
And I have the following documents nested inside "managers" directory under the "players" collection within the "gathering" directory:
|
||||
| title | content |
|
||||
| Tony Stark | content for Tony. |
|
||||
| Steve Rogers | content for Steve. |
|
||||
And I have the following documents nested inside "recruits" directory under the "players" collection within the "gathering" directory:
|
||||
| title | content |
|
||||
| Peter Parker | content for Peter. |
|
||||
| Wanda Maximoff | content for Wanda. |
|
||||
And I have the following documents nested inside "standby" directory under the "players" collection within the "gathering" directory:
|
||||
| title | content |
|
||||
| Thanos | content for Thanos. |
|
||||
| Loki | content for Loki. |
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
collections_dir: gathering
|
||||
collections: ["players"]
|
||||
defaults:
|
||||
- scope:
|
||||
path: ""
|
||||
type: players
|
||||
values:
|
||||
recruit: false
|
||||
manager: false
|
||||
villain: false
|
||||
- scope:
|
||||
path: gathering/_players/standby/thanos.md
|
||||
type: players
|
||||
values:
|
||||
villain: true
|
||||
- scope:
|
||||
path: gathering/_players/managers/*
|
||||
type: players
|
||||
values:
|
||||
manager: true
|
||||
- scope:
|
||||
path: gathering/_players/recruits/*
|
||||
type: players
|
||||
values:
|
||||
recruit: true
|
||||
"""
|
||||
And I have a "index.md" file with content:
|
||||
"""
|
||||
---
|
||||
---
|
||||
{% for player in site.players %}
|
||||
<p>{{ player.title }}: Manager: {{ player.manager }}</p>
|
||||
<p>{{ player.title }}: Recruit: {{ player.recruit }}</p>
|
||||
<p>{{ player.title }}: Villain: {{ player.villain }}</p>
|
||||
{% endfor %}
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p>Tony Stark: Manager: true</p>" in "_site/index.html"
|
||||
And I should see "<p>Tony Stark: Recruit: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Tony Stark: Villain: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Peter Parker: Manager: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Peter Parker: Recruit: true</p>" in "_site/index.html"
|
||||
And I should see "<p>Peter Parker: Villain: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Steve Rogers: Manager: true</p>" in "_site/index.html"
|
||||
And I should see "<p>Steve Rogers: Recruit: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Steve Rogers: Villain: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Wanda Maximoff: Manager: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Wanda Maximoff: Recruit: true</p>" in "_site/index.html"
|
||||
And I should see "<p>Wanda Maximoff: Villain: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Thanos: Manager: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Thanos: Recruit: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Thanos: Villain: true</p>" in "_site/index.html"
|
||||
And I should see "<p>Loki: Manager: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Loki: Recruit: false</p>" in "_site/index.html"
|
||||
And I should see "<p>Loki: Villain: false</p>" in "_site/index.html"
|
||||
|
||||
@@ -104,3 +104,28 @@ Feature: Include tags
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "include" in "_site/index.html"
|
||||
|
||||
Scenario: Include a file-path with non-alphanumeric character sequences
|
||||
Given I have an _includes directory
|
||||
And I have an "_includes/header-en.html" file that contains "include"
|
||||
And I have an "index.html" page that contains "{% include ./header-en.html %}"
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit status
|
||||
And I should see "Invalid syntax for include tag." in the build output
|
||||
When I have an "index.html" page that contains "{% include foo/.header-en.html %}"
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit status
|
||||
And I should see "Invalid syntax for include tag." in the build output
|
||||
When I have an "index.html" page that contains "{% include //header-en.html %}"
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit status
|
||||
And I should see "Invalid syntax for include tag." in the build output
|
||||
When I have an "index.html" page that contains "{% include ..header-en.html %}"
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit status
|
||||
And I should see "Invalid syntax for include tag." in the build output
|
||||
When I have an "index.html" page that contains "{% include header-en.html %}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "include" in "_site/index.html"
|
||||
|
||||
78
features/link_tag.feature
Normal file
78
features/link_tag.feature
Normal file
@@ -0,0 +1,78 @@
|
||||
Feature: Link Tag
|
||||
As a hacker who likes to write a variety of content
|
||||
I want to be able to link to pages and documents
|
||||
And render them without much hassle
|
||||
|
||||
Scenario: Basic site with two pages
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Home]({% link index.md %})"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about.html\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/\">Home</a></p>" in "_site/about.html"
|
||||
|
||||
Scenario: Basic site with custom page-permalinks
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page with permalink "/about/" that contains "[Home]({% link index.md %})"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about/\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/\">Home</a></p>" in "_site/about/index.html"
|
||||
|
||||
Scenario: Basic site with custom site-wide-permalinks
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Home]({% link index.md %})"
|
||||
And I have a configuration file with "permalink" set to "pretty"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about/\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/\">Home</a></p>" in "_site/about/index.html"
|
||||
|
||||
Scenario: Basic site with two pages and custom baseurl
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Home]({% link index.md %})"
|
||||
And I have a configuration file with "baseurl" set to "/blog"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about.html\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/\">Home</a></p>" in "_site/about.html"
|
||||
|
||||
Scenario: Basic site with two pages and custom baseurl and permalinks
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Home]({% link index.md %})"
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
baseurl: /blog
|
||||
permalink: pretty
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about/\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/\">Home</a></p>" in "_site/about/index.html"
|
||||
|
||||
Scenario: Linking to a ghost file
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Contact]({% link contact.md %})"
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit status
|
||||
And the _site directory should not exist
|
||||
And I should see "Could not find document 'contact.md' in tag 'link'" in the build output
|
||||
|
||||
Scenario: Complex site with a variety of files
|
||||
Given I have an "index.md" page that contains "[About my projects]({% link about.md %})"
|
||||
And I have an "about.md" page that contains "[Latest Hack]({% link _posts/2018-02-15-metaprogramming.md %})"
|
||||
And I have a _posts directory
|
||||
And I have an "_posts/2018-02-15-metaprogramming.md" page that contains "[Download This]({% link script.txt %})"
|
||||
And I have a "script.txt" file that contains "Static Alert!"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<p><a href=\"/about.html\">About my projects</a></p>" in "_site/index.html"
|
||||
And I should see "<p><a href=\"/2018/02/15/metaprogramming.html\">Latest Hack</a></p>" in "_site/about.html"
|
||||
And I should see "<p><a href=\"/script.txt\">Download This</a></p>" in "_site/2018/02/15/metaprogramming.html"
|
||||
And I should see "Static Alert!" in "_site/script.txt"
|
||||
@@ -251,6 +251,19 @@ Feature: Post data
|
||||
And I should see "Post categories: scifi and Movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
|
||||
And I should see "Post categories: SciFi and movies" in "_site/scifi/movies/2013/03/17/star-trek.html"
|
||||
|
||||
Scenario: Use page.render_with_liquid variable
|
||||
Given I have a _posts directory
|
||||
And I have the following posts:
|
||||
| title | render_with_liquid | date | content |
|
||||
| Unrendered Post | false | 2017-07-06 | Hello {{ page.title }} |
|
||||
| Rendered Post | true | 2017-07-06 | Hello {{ page.title }} |
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should not see "Hello Unrendered Post" in "_site/2017/07/06/unrendered-post.html"
|
||||
But I should see "Hello {{ page.title }}" in "_site/2017/07/06/unrendered-post.html"
|
||||
And I should see "Hello Rendered Post" in "_site/2017/07/06/rendered-post.html"
|
||||
|
||||
Scenario Outline: Use page.path variable
|
||||
Given I have a <dir>/_posts directory
|
||||
And I have the following post in "<dir>":
|
||||
|
||||
@@ -34,6 +34,25 @@ Feature: Post excerpts
|
||||
And I should see exactly "<p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
|
||||
And I should see exactly "<p>content for entry1.</p>" in "_site/index.html"
|
||||
|
||||
Scenario: An excerpt with Liquid constructs from a post with a layout
|
||||
Given I have an "index.html" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
|
||||
And I have a configuration file with "baseurl" set to "/blog"
|
||||
And I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
And I have a post layout that contains "{{ page.excerpt }}"
|
||||
And I have the following posts:
|
||||
| title | date | layout | content |
|
||||
| entry1 | 2007-12-31 | post | {{ 'assets/style.css' \| relative_url }} |
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And the _site/2007 directory should exist
|
||||
And the _site/2007/12 directory should exist
|
||||
And the _site/2007/12/31 directory should exist
|
||||
And the "_site/2007/12/31/entry1.html" file should exist
|
||||
And I should see exactly "<p>/blog/assets/style.css</p>" in "_site/2007/12/31/entry1.html"
|
||||
And I should see exactly "<p>/blog/assets/style.css</p>" in "_site/index.html"
|
||||
|
||||
Scenario: An excerpt from a post with a layout which has context
|
||||
Given I have an "index.html" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
|
||||
And I have a _posts directory
|
||||
@@ -51,3 +70,21 @@ Feature: Post excerpts
|
||||
And the "_site/2007/12/31/entry1.html" file should exist
|
||||
And I should see "<p>content for entry1.</p>" in "_site/index.html"
|
||||
And I should see "<html><head></head><body><p>content for entry1.</p>\n</body></html>" in "_site/2007/12/31/entry1.html"
|
||||
|
||||
Scenario: Excerpts from posts having 'render_with_liquid' in their front matter
|
||||
Given I have an "index.html" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
|
||||
And I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
And I have a post layout that contains "{{ page.excerpt }}"
|
||||
And I have the following posts:
|
||||
| title | layout | render_with_liquid | date | content |
|
||||
| Unrendered Post | post | false | 2017-07-06 | Liquid is not rendered at {{ page.url }} |
|
||||
| Rendered Post | post | true | 2017-07-06 | Liquid is rendered at {{ page.url }} |
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site/2017/07/06 directory should exist
|
||||
And the "_site/2017/07/06/unrendered-post.html" file should exist
|
||||
And the "_site/2017/07/06/rendered-post.html" file should exist
|
||||
And I should see "Liquid is not rendered at {{ page.url }}" in "_site/2017/07/06/unrendered-post.html"
|
||||
But I should see "<p>Liquid is rendered at /2017/07/06/rendered-post.html</p>" in "_site/2017/07/06/rendered-post.html"
|
||||
And I should see "<p>Liquid is not rendered at {{ page.url }}</p>\n<p>Liquid is rendered at /2017/07/06/rendered-post.html</p>" in "_site/index.html"
|
||||
|
||||
@@ -30,6 +30,50 @@ Feature: Rendering
|
||||
Then I should get a non-zero exit-status
|
||||
And I should see "Liquid Exception: Liquid error \(.+/_includes/invalid\.html line 1\): wrong number of arguments (\(given 1, expected 2\)|\(1 for 2\)) included in index\.html" in the build output
|
||||
|
||||
Scenario: Rendering a default site containing a file with rogue Liquid constructs
|
||||
Given I have a "index.html" page with title "Simple Test" that contains "{{ page.title | foobar }}\n\n{{ page.author }}"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit-status
|
||||
And I should not see "Liquid Exception:" in the build output
|
||||
|
||||
Scenario: Rendering a custom site containing a file with a non-existent Liquid variable
|
||||
Given I have a "index.html" file with content:
|
||||
"""
|
||||
---
|
||||
title: Simple Test
|
||||
---
|
||||
{{ page.title }}
|
||||
|
||||
{{ page.author }}
|
||||
"""
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
liquid:
|
||||
strict_variables: true
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit-status
|
||||
And I should see "Liquid error \(line 3\): undefined variable author in index.html" in the build output
|
||||
|
||||
Scenario: Rendering a custom site containing a file with a non-existent Liquid filter
|
||||
Given I have a "index.html" file with content:
|
||||
"""
|
||||
---
|
||||
author: John Doe
|
||||
---
|
||||
{{ page.title }}
|
||||
|
||||
{{ page.author | foobar }}
|
||||
"""
|
||||
And I have a "_config.yml" file with content:
|
||||
"""
|
||||
liquid:
|
||||
strict_filters: true
|
||||
"""
|
||||
When I run jekyll build
|
||||
Then I should get a non-zero exit-status
|
||||
And I should see "Liquid error \(line 3\): undefined filter foobar in index.html" in the build output
|
||||
|
||||
Scenario: Render Liquid and place in layout
|
||||
Given I have a "index.html" page with layout "simple" that contains "Hi there, Jekyll {{ jekyll.environment }}!"
|
||||
And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
|
||||
|
||||
@@ -65,14 +65,6 @@ Feature: Site configuration
|
||||
And the "_site/Rakefile" file should not exist
|
||||
And the "_site/README" file should not exist
|
||||
|
||||
Scenario: Use RDiscount for markup
|
||||
Given I have an "index.markdown" page that contains "[Google](https://www.google.com)"
|
||||
And I have a configuration file with "markdown" set to "rdiscount"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<a href=\"https://www.google.com\">Google</a>" in "_site/index.html"
|
||||
|
||||
Scenario: Use Kramdown for markup
|
||||
Given I have an "index.markdown" page that contains "[Google](https://www.google.com)"
|
||||
And I have a configuration file with "markdown" set to "kramdown"
|
||||
@@ -81,14 +73,6 @@ Feature: Site configuration
|
||||
And the _site directory should exist
|
||||
And I should see "<a href=\"https://www.google.com\">Google</a>" in "_site/index.html"
|
||||
|
||||
Scenario: Use Redcarpet for markup
|
||||
Given I have an "index.markdown" page that contains "[Google](https://www.google.com)"
|
||||
And I have a configuration file with "markdown" set to "redcarpet"
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And I should see "<a href=\"https://www.google.com\">Google</a>" in "_site/index.html"
|
||||
|
||||
Scenario: Highlight code with pygments
|
||||
Given I have an "index.html" page that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
|
||||
When I run jekyll build
|
||||
|
||||
@@ -36,7 +36,7 @@ end
|
||||
Given(%r!^I have an? "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$!) do |file, key, value, text|
|
||||
File.write(file, Jekyll::Utils.strip_heredoc(<<-DATA))
|
||||
---
|
||||
#{key || "layout"}: #{value || "nil"}
|
||||
#{key || "layout"}: #{value || "none"}
|
||||
---
|
||||
|
||||
#{text}
|
||||
@@ -135,6 +135,16 @@ end
|
||||
|
||||
#
|
||||
|
||||
Given(%r!^I have the following documents? nested inside "(.*)" directory under the "(.*)" collection within the "(.*)" directory:$!) do |subdir, label, dir, table|
|
||||
table.hashes.each do |input_hash|
|
||||
title = slug(input_hash["title"])
|
||||
path = File.join(dir, "_#{label}", subdir, "#{title}.md")
|
||||
File.write(path, file_content_from_hash(input_hash))
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
Given(%r!^I have a configuration file with "(.*)" set to "(.*)"$!) do |key, value|
|
||||
config = \
|
||||
if source_dir.join("_config.yml").exist?
|
||||
@@ -216,8 +226,6 @@ end
|
||||
|
||||
When(%r!^I decide to build the theme gem$!) do
|
||||
Dir.chdir(Paths.theme_gem_dir)
|
||||
gemspec = "my-cool-theme.gemspec"
|
||||
File.write(gemspec, File.read(gemspec).sub("TODO: ", ""))
|
||||
File.new("_includes/blank.html", "w")
|
||||
File.new("_sass/blank.scss", "w")
|
||||
File.new("assets/blank.scss", "w")
|
||||
|
||||
@@ -17,7 +17,7 @@ Feature: Building Theme Gems
|
||||
Then the "assets/blank.scss" file should exist
|
||||
When I run git add .
|
||||
Then I should get an updated git index
|
||||
When I run gem build my-cool-theme.gemspec
|
||||
When I run gem build --force my-cool-theme.gemspec
|
||||
Then the "./my-cool-theme-0.1.0.gem" file should exist
|
||||
When I run gem unpack my-cool-theme-0.1.0.gem
|
||||
Then the my-cool-theme-0.1.0 directory should exist
|
||||
|
||||
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
||||
s.specification_version = 2 if s.respond_to? :specification_version=
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.rubygems_version = "2.2.2"
|
||||
s.required_ruby_version = ">= 2.1.0"
|
||||
s.required_ruby_version = ">= 2.3.0"
|
||||
|
||||
s.name = "jekyll"
|
||||
s.version = Jekyll::VERSION
|
||||
@@ -33,14 +33,13 @@ Gem::Specification.new do |s|
|
||||
s.add_runtime_dependency("addressable", "~> 2.4")
|
||||
s.add_runtime_dependency("colorator", "~> 1.0")
|
||||
s.add_runtime_dependency("em-websocket", "~> 0.5")
|
||||
s.add_runtime_dependency("i18n", "~> 0.7")
|
||||
s.add_runtime_dependency("i18n", ">= 0.9.5", "< 2")
|
||||
s.add_runtime_dependency("jekyll-sass-converter", "~> 1.0")
|
||||
s.add_runtime_dependency("jekyll-watch", "~> 2.0")
|
||||
s.add_runtime_dependency("kramdown", "~> 1.14")
|
||||
s.add_runtime_dependency("liquid", "~> 4.0")
|
||||
s.add_runtime_dependency("mercenary", "~> 0.3.3")
|
||||
s.add_runtime_dependency("pathutil", "~> 0.9")
|
||||
rouge_versions = ENV["ROUGE_VERSION"] ? ["~> #{ENV["ROUGE_VERSION"]}"] : [">= 1.7", "< 4"]
|
||||
s.add_runtime_dependency("rouge", *rouge_versions)
|
||||
s.add_runtime_dependency("rouge", "~> 3.0")
|
||||
s.add_runtime_dependency("safe_yaml", "~> 1.0")
|
||||
end
|
||||
|
||||
@@ -18,7 +18,6 @@ end
|
||||
require "rubygems"
|
||||
|
||||
# stdlib
|
||||
require "pathutil"
|
||||
require "forwardable"
|
||||
require "fileutils"
|
||||
require "time"
|
||||
@@ -26,8 +25,12 @@ require "English"
|
||||
require "pathname"
|
||||
require "logger"
|
||||
require "set"
|
||||
require "csv"
|
||||
require "json"
|
||||
|
||||
# 3rd party
|
||||
require "pathutil"
|
||||
require "addressable/uri"
|
||||
require "safe_yaml/load"
|
||||
require "liquid"
|
||||
require "kramdown"
|
||||
@@ -51,6 +54,7 @@ module Jekyll
|
||||
autoload :FrontmatterDefaults, "jekyll/frontmatter_defaults"
|
||||
autoload :Hooks, "jekyll/hooks"
|
||||
autoload :Layout, "jekyll/layout"
|
||||
autoload :Cache, "jekyll/cache"
|
||||
autoload :CollectionReader, "jekyll/readers/collection_reader"
|
||||
autoload :DataReader, "jekyll/readers/data_reader"
|
||||
autoload :LayoutReader, "jekyll/readers/layout_reader"
|
||||
|
||||
127
lib/jekyll/cache.rb
Normal file
127
lib/jekyll/cache.rb
Normal file
@@ -0,0 +1,127 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "digest"
|
||||
require "fileutils"
|
||||
require "pstore"
|
||||
|
||||
module Jekyll
|
||||
class Cache
|
||||
extend Forwardable
|
||||
|
||||
# Get an existing named cache, or create a new one if none exists
|
||||
#
|
||||
# name - name of the cache
|
||||
#
|
||||
# Returns nothing.
|
||||
# rubocop:disable Style/ClassVars
|
||||
def initialize(name)
|
||||
@@base_dir ||= File.expand_path(".jekyll-cache/Jekyll/Cache")
|
||||
@@caches ||= {}
|
||||
@cache = @@caches[name] ||= {}
|
||||
@name = name
|
||||
FileUtils.mkdir_p(path_to)
|
||||
end
|
||||
|
||||
def self.clear
|
||||
delete_cache_files
|
||||
@@caches.each_value(&:clear)
|
||||
end
|
||||
# rubocop:enable Style/ClassVars
|
||||
|
||||
def clear
|
||||
delete_cache_files
|
||||
@cache.clear
|
||||
end
|
||||
|
||||
def [](key)
|
||||
return @cache[key] if @cache.key?(key)
|
||||
path = path_to(hash(key))
|
||||
if File.file?(path) && File.readable?(path)
|
||||
@cache[key] = load(path)
|
||||
else
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
||||
def getset(key)
|
||||
return @cache[key] if @cache.key?(key)
|
||||
path = path_to(hash(key))
|
||||
if File.file?(path) && File.readable?(path)
|
||||
value = load(path)
|
||||
else
|
||||
value = yield
|
||||
dump(path, value)
|
||||
end
|
||||
@cache[key] = value
|
||||
end
|
||||
|
||||
def []=(key, value)
|
||||
@cache[key] = value
|
||||
path = path_to(hash(key))
|
||||
dump(path, value)
|
||||
end
|
||||
|
||||
def delete(key)
|
||||
@cache.delete(key)
|
||||
path = path_to(hash(key))
|
||||
File.delete(path)
|
||||
end
|
||||
|
||||
def key?(key)
|
||||
return true if @cache.key?(key)
|
||||
path = path_to(hash(key))
|
||||
File.file?(path) && File.readable?(path)
|
||||
end
|
||||
|
||||
# rubocop:disable Style/ClassVars
|
||||
def self.clear_if_config_changed(config)
|
||||
config = config.inspect
|
||||
cache = Jekyll::Cache.new "Jekyll::Cache"
|
||||
unless cache.key?("config") && cache["config"] == config
|
||||
delete_cache_files
|
||||
@@caches = {}
|
||||
cache = Jekyll::Cache.new "Jekyll::Cache"
|
||||
cache["config"] = config
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/ClassVars
|
||||
|
||||
private
|
||||
|
||||
def path_to(hash = nil)
|
||||
@base_dir ||= File.join(@@base_dir, @name)
|
||||
return @base_dir if hash.nil?
|
||||
File.join(@base_dir, hash[0..1], hash[2..-1]).freeze
|
||||
end
|
||||
|
||||
def hash(key)
|
||||
Digest::SHA2.hexdigest(key).freeze
|
||||
end
|
||||
|
||||
def delete_cache_files
|
||||
FileUtils.rm_rf(path_to)
|
||||
end
|
||||
|
||||
# rubocop:disable Security/MarshalLoad
|
||||
def load(path)
|
||||
cached_file = File.open(path, "rb")
|
||||
value = Marshal.load(cached_file)
|
||||
cached_file.close
|
||||
value
|
||||
end
|
||||
# rubocop:enable Security/MarshalLoad
|
||||
|
||||
def dump(path, value)
|
||||
dir, _file = File.split(path)
|
||||
FileUtils.mkdir_p(dir)
|
||||
cached_file = File.open(path, "wb")
|
||||
Marshal.dump(value, cached_file)
|
||||
cached_file.close
|
||||
end
|
||||
|
||||
def self.delete_cache_files
|
||||
FileUtils.rm_rf(@@base_dir)
|
||||
end
|
||||
private_class_method :delete_cache_files
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "set"
|
||||
|
||||
module Jekyll
|
||||
# Handles the cleanup of a site's destination before it is built.
|
||||
class Cleaner
|
||||
@@ -57,9 +55,9 @@ module Jekyll
|
||||
#
|
||||
# Returns a Set with the file paths
|
||||
def new_files
|
||||
files = Set.new
|
||||
site.each_site_file { |item| files << item.destination(site.dest) }
|
||||
files
|
||||
@new_files ||= Set.new.tap do |files|
|
||||
site.each_site_file { |item| files << item.destination(site.dest) }
|
||||
end
|
||||
end
|
||||
|
||||
# Private: The list of directories to be created when site is built.
|
||||
@@ -67,7 +65,7 @@ module Jekyll
|
||||
#
|
||||
# Returns a Set with the directory paths
|
||||
def new_dirs
|
||||
new_files.map { |file| parent_dirs(file) }.flatten.to_set
|
||||
@new_dirs ||= new_files.map { |file| parent_dirs(file) }.flatten.to_set
|
||||
end
|
||||
|
||||
# Private: The list of parent directories of a given file
|
||||
|
||||
@@ -35,7 +35,7 @@ module Jekyll
|
||||
def method_missing(method, *args, &blck)
|
||||
if docs.respond_to?(method.to_sym)
|
||||
Jekyll.logger.warn "Deprecation:",
|
||||
"#{label}.#{method} should be changed to #{label}.docs.#{method}."
|
||||
"#{label}.#{method} should be changed to #{label}.docs.#{method}."
|
||||
Jekyll.logger.warn "", "Called by #{caller(0..0)}."
|
||||
docs.public_send(method.to_sym, *args, &blck)
|
||||
else
|
||||
@@ -207,20 +207,12 @@ module Jekyll
|
||||
@container ||= site.config["collections_dir"]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def read_document(full_path)
|
||||
doc = Jekyll::Document.new(full_path, :site => site, :collection => self)
|
||||
doc = Document.new(full_path, :site => site, :collection => self)
|
||||
doc.read
|
||||
if site.publisher.publish?(doc) || !write?
|
||||
docs << doc
|
||||
else
|
||||
Jekyll.logger.debug "Skipped Publishing:", doc.relative_path
|
||||
end
|
||||
docs << doc if site.unpublished || doc.published?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def read_static_file(file_path, full_path)
|
||||
relative_dir = Jekyll.sanitized_path(
|
||||
relative_directory,
|
||||
|
||||
@@ -45,34 +45,58 @@ module Jekyll
|
||||
|
||||
# Add common options to a command for building configuration
|
||||
#
|
||||
# c - the Jekyll::Command to add these options to
|
||||
# cmd - the Jekyll::Command to add these options to
|
||||
#
|
||||
# Returns nothing
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
def add_build_options(c)
|
||||
c.option "config", "--config CONFIG_FILE[,CONFIG_FILE2,...]",
|
||||
Array, "Custom configuration file"
|
||||
c.option "destination", "-d", "--destination DESTINATION",
|
||||
"The current folder will be generated into DESTINATION"
|
||||
c.option "source", "-s", "--source SOURCE", "Custom source directory"
|
||||
c.option "future", "--future", "Publishes posts with a future date"
|
||||
c.option "limit_posts", "--limit_posts MAX_POSTS", Integer,
|
||||
"Limits the number of posts to parse and publish"
|
||||
c.option "watch", "-w", "--[no-]watch", "Watch for changes and rebuild"
|
||||
c.option "baseurl", "-b", "--baseurl URL",
|
||||
"Serve the website from the given base URL"
|
||||
c.option "force_polling", "--force_polling", "Force watch to use polling"
|
||||
c.option "lsi", "--lsi", "Use LSI for improved related posts"
|
||||
c.option "show_drafts", "-D", "--drafts", "Render posts in the _drafts folder"
|
||||
c.option "unpublished", "--unpublished",
|
||||
"Render posts that were marked as unpublished"
|
||||
c.option "quiet", "-q", "--quiet", "Silence output."
|
||||
c.option "verbose", "-V", "--verbose", "Print verbose output."
|
||||
c.option "incremental", "-I", "--incremental", "Enable incremental rebuild."
|
||||
c.option "strict_front_matter", "--strict_front_matter",
|
||||
"Fail if errors are present in front matter"
|
||||
def add_build_options(cmd)
|
||||
cmd.option "config", "--config CONFIG_FILE[,CONFIG_FILE2,...]",
|
||||
Array, "Custom configuration file"
|
||||
cmd.option "destination", "-d", "--destination DESTINATION",
|
||||
"The current folder will be generated into DESTINATION"
|
||||
cmd.option "source", "-s", "--source SOURCE", "Custom source directory"
|
||||
cmd.option "future", "--future", "Publishes posts with a future date"
|
||||
cmd.option "limit_posts", "--limit_posts MAX_POSTS", Integer,
|
||||
"Limits the number of posts to parse and publish"
|
||||
cmd.option "watch", "-w", "--[no-]watch", "Watch for changes and rebuild"
|
||||
cmd.option "baseurl", "-b", "--baseurl URL",
|
||||
"Serve the website from the given base URL"
|
||||
cmd.option "force_polling", "--force_polling", "Force watch to use polling"
|
||||
cmd.option "lsi", "--lsi", "Use LSI for improved related posts"
|
||||
cmd.option "show_drafts", "-D", "--drafts", "Render posts in the _drafts folder"
|
||||
cmd.option "unpublished", "--unpublished",
|
||||
"Render posts that were marked as unpublished"
|
||||
cmd.option "quiet", "-q", "--quiet", "Silence output."
|
||||
cmd.option "verbose", "-V", "--verbose", "Print verbose output."
|
||||
cmd.option "incremental", "-I", "--incremental", "Enable incremental rebuild."
|
||||
cmd.option "strict_front_matter", "--strict_front_matter",
|
||||
"Fail if errors are present in front matter"
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
# Run ::process method in a given set of Jekyll::Command subclasses and suggest
|
||||
# re-running the associated command with --trace switch to obtain any additional
|
||||
# information or backtrace regarding the encountered Exception.
|
||||
#
|
||||
# cmd - the Jekyll::Command to be handled
|
||||
# options - configuration overrides
|
||||
# klass - an array of Jekyll::Command subclasses associated with the command
|
||||
#
|
||||
# Note that all exceptions are rescued..
|
||||
# rubocop: disable RescueException
|
||||
def process_with_graceful_fail(cmd, options, *klass)
|
||||
klass.each { |k| k.process(options) if k.respond_to?(:process) }
|
||||
rescue Exception => e
|
||||
raise e if cmd.trace
|
||||
|
||||
msg = " Please append `--trace` to the `#{cmd.name}` command "
|
||||
dashes = "-" * msg.length
|
||||
Jekyll.logger.error "", dashes
|
||||
Jekyll.logger.error "Jekyll #{Jekyll::VERSION} ", msg
|
||||
Jekyll.logger.error "", " for any additional information or backtrace. "
|
||||
Jekyll.logger.abort_with "", dashes
|
||||
end
|
||||
# rubocop: enable RescueException
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ module Jekyll
|
||||
|
||||
c.action do |_, options|
|
||||
options["serving"] = false
|
||||
Jekyll::Commands::Build.process(options)
|
||||
process_with_graceful_fail(c, options, self)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -31,14 +31,14 @@ module Jekyll
|
||||
|
||||
if options.fetch("skip_initial_build", false)
|
||||
Jekyll.logger.warn "Build Warning:", "Skipping the initial build." \
|
||||
" This may result in an out-of-date site."
|
||||
" This may result in an out-of-date site."
|
||||
else
|
||||
build(site, options)
|
||||
end
|
||||
|
||||
if options.fetch("detach", false)
|
||||
Jekyll.logger.info "Auto-regeneration:",
|
||||
"disabled when running server detached."
|
||||
"disabled when running server detached."
|
||||
elsif options.fetch("watch", false)
|
||||
watch(site, options)
|
||||
else
|
||||
@@ -60,7 +60,7 @@ module Jekyll
|
||||
Jekyll.logger.info "Source:", source
|
||||
Jekyll.logger.info "Destination:", destination
|
||||
Jekyll.logger.info "Incremental build:",
|
||||
(incremental ? "enabled" : "disabled. Enable with --incremental")
|
||||
(incremental ? "enabled" : "disabled. Enable with --incremental")
|
||||
Jekyll.logger.info "Generating..."
|
||||
process_site(site)
|
||||
Jekyll.logger.info "", "done in #{(Time.now - t).round(3)} seconds."
|
||||
@@ -76,12 +76,12 @@ module Jekyll
|
||||
# Warn Windows users that they might need to upgrade.
|
||||
if Utils::Platforms.bash_on_windows?
|
||||
Jekyll.logger.warn "",
|
||||
"Auto-regeneration may not work on some Windows versions."
|
||||
"Auto-regeneration may not work on some Windows versions."
|
||||
Jekyll.logger.warn "",
|
||||
"Please see: https://github.com/Microsoft/BashOnWindows/issues/216"
|
||||
"Please see: https://github.com/Microsoft/BashOnWindows/issues/216"
|
||||
Jekyll.logger.warn "",
|
||||
"If it does not work, please upgrade Bash on Windows or "\
|
||||
"run Jekyll with --no-watch."
|
||||
"If it does not work, please upgrade Bash on Windows or "\
|
||||
"run Jekyll with --no-watch."
|
||||
end
|
||||
|
||||
External.require_with_graceful_fail "jekyll-watch"
|
||||
|
||||
@@ -22,10 +22,12 @@ module Jekyll
|
||||
options = configuration_from_options(options)
|
||||
destination = options["destination"]
|
||||
metadata_file = File.join(options["source"], ".jekyll-metadata")
|
||||
cache_dir = File.join(options["source"], options["cache_dir"])
|
||||
sass_cache = ".sass-cache"
|
||||
|
||||
remove(destination, :checker_func => :directory?)
|
||||
remove(metadata_file, :checker_func => :file?)
|
||||
remove(cache_dir, :checker_func => :directory?)
|
||||
remove(sass_cache, :checker_func => :directory?)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "addressable/uri"
|
||||
|
||||
module Jekyll
|
||||
module Commands
|
||||
class Doctor < Command
|
||||
@@ -13,7 +11,7 @@ module Jekyll
|
||||
c.alias(:hyde)
|
||||
|
||||
c.option "config", "--config CONFIG_FILE[,CONFIG_FILE2,...]", Array,
|
||||
"Custom configuration file"
|
||||
"Custom configuration file"
|
||||
|
||||
c.action do |_, options|
|
||||
Jekyll::Commands::Doctor.process(options)
|
||||
@@ -41,15 +39,27 @@ module Jekyll
|
||||
!conflicting_urls(site),
|
||||
!urls_only_differ_by_case(site),
|
||||
proper_site_url?(site),
|
||||
properly_gathered_posts?(site),
|
||||
].all?
|
||||
end
|
||||
|
||||
def properly_gathered_posts?(site)
|
||||
return true if site.config["collections_dir"].empty?
|
||||
posts_at_root = site.in_source_dir("_posts")
|
||||
return true unless File.directory?(posts_at_root)
|
||||
Jekyll.logger.warn "Warning:",
|
||||
"Detected '_posts' directory outside custom `collections_dir`!"
|
||||
Jekyll.logger.warn "",
|
||||
"Please move '#{posts_at_root}' into the custom directory at " \
|
||||
"'#{site.in_source_dir(site.config["collections_dir"])}'"
|
||||
false
|
||||
end
|
||||
|
||||
def deprecated_relative_permalinks(site)
|
||||
if site.config["relative_permalinks"]
|
||||
Jekyll::Deprecator.deprecation_message "Your site still uses relative" \
|
||||
" permalinks, which was removed in" \
|
||||
" Jekyll v3.0.0."
|
||||
return true
|
||||
Jekyll::Deprecator.deprecation_message "Your site still uses relative permalinks," \
|
||||
" which was removed in Jekyll v3.0.0."
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -106,6 +116,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def collect_urls(urls, things, destination)
|
||||
things.each do |thing|
|
||||
dest = thing.destination(destination)
|
||||
|
||||
@@ -25,7 +25,7 @@ module Jekyll
|
||||
|
||||
def invalid_command(prog, cmd)
|
||||
Jekyll.logger.error "Error:",
|
||||
"Hmm... we don't know what the '#{cmd}' command is."
|
||||
"Hmm... we don't know what the '#{cmd}' command is."
|
||||
Jekyll.logger.info "Valid commands:", prog.commands.keys.join(", ")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,8 +27,9 @@ module Jekyll
|
||||
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
|
||||
FileUtils.mkdir_p new_blog_path
|
||||
if preserve_source_location?(new_blog_path, options)
|
||||
Jekyll.logger.abort_with "Conflict:",
|
||||
"#{new_blog_path} exists and is not empty."
|
||||
Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
|
||||
Jekyll.logger.abort_with "", "Ensure #{new_blog_path} is empty or else " \
|
||||
"try again with `--force` to proceed and overwrite any files."
|
||||
end
|
||||
|
||||
if options["blank"]
|
||||
@@ -61,38 +62,32 @@ module Jekyll
|
||||
private
|
||||
|
||||
def gemfile_contents
|
||||
<<-RUBY
|
||||
source "https://rubygems.org"
|
||||
<<~RUBY
|
||||
source "https://rubygems.org"
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
gem "jekyll", "~> #{Jekyll::VERSION}"
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
gem "minima", "~> 2.0"
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
# gem "github-pages", group: :jekyll_plugins
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.6"
|
||||
end
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.0" if Gem.win_platform?
|
||||
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
gem "jekyll", "~> #{Jekyll::VERSION}"
|
||||
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
gem "minima", "~> 2.0"
|
||||
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
# gem "github-pages", group: :jekyll_plugins
|
||||
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.6"
|
||||
end
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.0" if Gem.win_platform?
|
||||
|
||||
RUBY
|
||||
RUBY
|
||||
end
|
||||
|
||||
def create_site(new_blog_path)
|
||||
|
||||
@@ -2,39 +2,41 @@
|
||||
|
||||
require "erb"
|
||||
|
||||
class Jekyll::Commands::NewTheme < Jekyll::Command
|
||||
class << self
|
||||
def init_with_program(prog)
|
||||
prog.command(:"new-theme") do |c|
|
||||
c.syntax "new-theme NAME"
|
||||
c.description "Creates a new Jekyll theme scaffold"
|
||||
c.option "code_of_conduct", \
|
||||
"-c", "--code-of-conduct", \
|
||||
"Include a Code of Conduct. (defaults to false)"
|
||||
module Jekyll
|
||||
module Commands
|
||||
class NewTheme < Jekyll::Command
|
||||
class << self
|
||||
def init_with_program(prog)
|
||||
prog.command(:"new-theme") do |c|
|
||||
c.syntax "new-theme NAME"
|
||||
c.description "Creates a new Jekyll theme scaffold"
|
||||
c.option "code_of_conduct", \
|
||||
"-c", "--code-of-conduct", \
|
||||
"Include a Code of Conduct. (defaults to false)"
|
||||
|
||||
c.action do |args, opts|
|
||||
Jekyll::Commands::NewTheme.process(args, opts)
|
||||
c.action do |args, opts|
|
||||
Jekyll::Commands::NewTheme.process(args, opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def process(args, opts)
|
||||
if !args || args.empty?
|
||||
raise Jekyll::Errors::InvalidThemeName, "You must specify a theme name."
|
||||
end
|
||||
|
||||
new_theme_name = args.join("_")
|
||||
theme = Jekyll::ThemeBuilder.new(new_theme_name, opts)
|
||||
Jekyll.logger.abort_with "Conflict:", "#{theme.path} already exists." if theme.path.exist?
|
||||
|
||||
theme.create!
|
||||
Jekyll.logger.info "Your new Jekyll theme, #{theme.name.cyan}," \
|
||||
" is ready for you in #{theme.path.to_s.cyan}!"
|
||||
Jekyll.logger.info "For help getting started, read #{theme.path}/README.md."
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
end
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def process(args, opts)
|
||||
if !args || args.empty?
|
||||
raise Jekyll::Errors::InvalidThemeName, "You must specify a theme name."
|
||||
end
|
||||
|
||||
new_theme_name = args.join("_")
|
||||
theme = Jekyll::ThemeBuilder.new(new_theme_name, opts)
|
||||
if theme.path.exist?
|
||||
Jekyll.logger.abort_with "Conflict:", "#{theme.path} already exists."
|
||||
end
|
||||
|
||||
theme.create!
|
||||
Jekyll.logger.info "Your new Jekyll theme, #{theme.name.cyan}," \
|
||||
" is ready for you in #{theme.path.to_s.cyan}!"
|
||||
Jekyll.logger.info "For help getting started, read #{theme.path}/README.md."
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "thread"
|
||||
|
||||
module Jekyll
|
||||
module Commands
|
||||
class Serve < Command
|
||||
@@ -19,25 +17,28 @@ module Jekyll
|
||||
"host" => ["host", "-H", "--host [HOST]", "Host to bind to"],
|
||||
"open_url" => ["-o", "--open-url", "Launch your site in a browser"],
|
||||
"detach" => ["-B", "--detach",
|
||||
"Run the server in the background",],
|
||||
"Run the server in the background",],
|
||||
"ssl_key" => ["--ssl-key [KEY]", "X.509 (SSL) Private Key."],
|
||||
"port" => ["-P", "--port [PORT]", "Port to listen on"],
|
||||
"show_dir_listing" => ["--show-dir-listing",
|
||||
"Show a directory listing instead of loading your index file.",],
|
||||
"Show a directory listing instead of loading" \
|
||||
" your index file.",],
|
||||
"skip_initial_build" => ["skip_initial_build", "--skip-initial-build",
|
||||
"Skips the initial site build which occurs before the server is started.",],
|
||||
"Skips the initial site build which occurs before" \
|
||||
" the server is started.",],
|
||||
"livereload" => ["-l", "--livereload",
|
||||
"Use LiveReload to automatically refresh browsers",],
|
||||
"Use LiveReload to automatically refresh browsers",],
|
||||
"livereload_ignore" => ["--livereload-ignore ignore GLOB1[,GLOB2[,...]]",
|
||||
Array,
|
||||
"Files for LiveReload to ignore. Remember to quote the values so your shell "\
|
||||
"won't expand them",],
|
||||
Array,
|
||||
"Files for LiveReload to ignore. " \
|
||||
"Remember to quote the values so your shell " \
|
||||
"won't expand them",],
|
||||
"livereload_min_delay" => ["--livereload-min-delay [SECONDS]",
|
||||
"Minimum reload delay",],
|
||||
"Minimum reload delay",],
|
||||
"livereload_max_delay" => ["--livereload-max-delay [SECONDS]",
|
||||
"Maximum reload delay",],
|
||||
"Maximum reload delay",],
|
||||
"livereload_port" => ["--livereload-port [PORT]", Integer,
|
||||
"Port for LiveReload to listen on",],
|
||||
"Port for LiveReload to listen on",],
|
||||
}.freeze
|
||||
|
||||
DIRECTORY_INDEX = %w(
|
||||
@@ -70,35 +71,30 @@ module Jekyll
|
||||
cmd.action do |_, opts|
|
||||
opts["livereload_port"] ||= LIVERELOAD_PORT
|
||||
opts["serving"] = true
|
||||
opts["watch" ] = true unless opts.key?("watch")
|
||||
opts["watch"] = true unless opts.key?("watch")
|
||||
|
||||
start(opts)
|
||||
# Set the reactor to nil so any old reactor will be GCed.
|
||||
# We can't unregister a hook so while running tests we don't want to
|
||||
# inadvertently keep using a reactor created by a previous test.
|
||||
@reload_reactor = nil
|
||||
|
||||
config = configuration_from_options(opts)
|
||||
config["url"] = default_url(config) if Jekyll.env == "development"
|
||||
|
||||
process_with_graceful_fail(cmd, config, Build, Serve)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
def start(opts)
|
||||
# Set the reactor to nil so any old reactor will be GCed.
|
||||
# We can't unregister a hook so in testing when Serve.start is
|
||||
# called multiple times we don't want to inadvertently keep using
|
||||
# a reactor created by a previous test when our test might not
|
||||
@reload_reactor = nil
|
||||
|
||||
config = configuration_from_options(opts)
|
||||
if Jekyll.env == "development"
|
||||
config["url"] = default_url(config)
|
||||
end
|
||||
[Build, Serve].each { |klass| klass.process(config) }
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
def process(opts)
|
||||
opts = configuration_from_options(opts)
|
||||
destination = opts["destination"]
|
||||
register_reload_hooks(opts) if opts["livereload"]
|
||||
if opts["livereload"]
|
||||
validate_options(opts)
|
||||
register_reload_hooks(opts)
|
||||
end
|
||||
setup(destination)
|
||||
|
||||
start_up_webrick(opts, destination)
|
||||
@@ -111,11 +107,12 @@ module Jekyll
|
||||
# Perform logical validation of CLI options
|
||||
|
||||
private
|
||||
|
||||
def validate_options(opts)
|
||||
if opts["livereload"]
|
||||
if opts["detach"]
|
||||
Jekyll.logger.warn "Warning:",
|
||||
"--detach and --livereload are mutually exclusive. Choosing --livereload"
|
||||
Jekyll.logger.warn "Warning:", "--detach and --livereload are mutually exclusive." \
|
||||
" Choosing --livereload"
|
||||
opts["detach"] = false
|
||||
end
|
||||
if opts["ssl_cert"] || opts["ssl_key"]
|
||||
@@ -130,18 +127,15 @@ module Jekyll
|
||||
opts["watch"] = true
|
||||
end
|
||||
elsif %w(livereload_min_delay
|
||||
livereload_max_delay
|
||||
livereload_ignore
|
||||
livereload_port).any? { |o| opts[o] }
|
||||
livereload_max_delay
|
||||
livereload_ignore
|
||||
livereload_port).any? { |o| opts[o] }
|
||||
Jekyll.logger.abort_with "--livereload-min-delay, "\
|
||||
"--livereload-max-delay, --livereload-ignore, and "\
|
||||
"--livereload-port require the --livereload option."
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def register_reload_hooks(opts)
|
||||
require_relative "serve/live_reload_reactor"
|
||||
@@ -173,12 +167,12 @@ module Jekyll
|
||||
@changed_pages = nil
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
# Do a base pre-setup of WEBRick so that everything is in place
|
||||
# when we get ready to party, checking for an setting up an error page
|
||||
# and making sure our destination exists.
|
||||
|
||||
private
|
||||
def setup(destination)
|
||||
require_relative "serve/servlet"
|
||||
|
||||
@@ -193,9 +187,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def webrick_opts(opts)
|
||||
opts = {
|
||||
:JekyllOptions => opts,
|
||||
@@ -216,13 +207,8 @@ module Jekyll
|
||||
opts
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def start_up_webrick(opts, destination)
|
||||
if opts["livereload"]
|
||||
@reload_reactor.start(opts)
|
||||
end
|
||||
@reload_reactor.start(opts) if opts["livereload"]
|
||||
|
||||
@server = WEBrick::HTTPServer.new(webrick_opts(opts)).tap { |o| o.unmount("") }
|
||||
@server.mount(opts["baseurl"].to_s, Servlet, destination, file_handler_opts)
|
||||
@@ -233,20 +219,15 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Recreate NondisclosureName under utf-8 circumstance
|
||||
|
||||
private
|
||||
def file_handler_opts
|
||||
WEBrick::Config::FileHandler.merge({
|
||||
WEBrick::Config::FileHandler.merge(
|
||||
:FancyIndexing => true,
|
||||
:NondisclosureName => [
|
||||
".ht*", "~*",
|
||||
],
|
||||
})
|
||||
]
|
||||
)
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def server_address(server, options = {})
|
||||
format_url(
|
||||
server.config[:SSLEnable],
|
||||
@@ -256,19 +237,14 @@ module Jekyll
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
def format_url(ssl_enabled, address, port, baseurl = nil)
|
||||
format("%<prefix>s://%<address>s:%<port>i%<baseurl>s", {
|
||||
:prefix => ssl_enabled ? "https" : "http",
|
||||
:address => address,
|
||||
:port => port,
|
||||
:baseurl => baseurl ? "#{baseurl}/" : "",
|
||||
})
|
||||
format("%<prefix>s://%<address>s:%<port>i%<baseurl>s",
|
||||
:prefix => ssl_enabled ? "https" : "http",
|
||||
:address => address,
|
||||
:port => port,
|
||||
:baseurl => baseurl ? "#{baseurl}/" : "")
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def default_url(opts)
|
||||
config = configuration_from_options(opts)
|
||||
format_url(
|
||||
@@ -278,9 +254,6 @@ module Jekyll
|
||||
)
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def launch_browser(server, opts)
|
||||
address = server_address(server, opts)
|
||||
return system "start", address if Utils::Platforms.windows?
|
||||
@@ -293,8 +266,6 @@ module Jekyll
|
||||
# Keep in our area with a thread or detach the server as requested
|
||||
# by the user. This method determines what we do based on what you
|
||||
# ask us to do.
|
||||
|
||||
private
|
||||
def boot_or_detach(server, opts)
|
||||
if opts["detach"]
|
||||
pid = Process.fork do
|
||||
@@ -303,7 +274,8 @@ module Jekyll
|
||||
|
||||
Process.detach(pid)
|
||||
Jekyll.logger.info "Server detached with pid '#{pid}'.", \
|
||||
"Run `pkill -f jekyll' or `kill -9 #{pid}' to stop the server."
|
||||
"Run `pkill -f jekyll' or `kill -9 #{pid}'" \
|
||||
" to stop the server."
|
||||
else
|
||||
t = Thread.new { server.start }
|
||||
trap("INT") { server.shutdown }
|
||||
@@ -312,8 +284,6 @@ module Jekyll
|
||||
end
|
||||
|
||||
# Make the stack verbose if the user requests it.
|
||||
|
||||
private
|
||||
def enable_logging(opts)
|
||||
opts[:AccessLog] = []
|
||||
level = WEBrick::Log.const_get(opts[:JekyllOptions]["verbose"] ? :DEBUG : :WARN)
|
||||
@@ -323,8 +293,6 @@ module Jekyll
|
||||
# Add SSL to the stack if the user triggers --enable-ssl and they
|
||||
# provide both types of certificates commonly needed. Raise if they
|
||||
# forget to add one of the certificates.
|
||||
|
||||
private
|
||||
def enable_ssl(opts)
|
||||
cert, key, src =
|
||||
opts[:JekyllOptions].values_at("ssl_cert", "ssl_key", "source")
|
||||
@@ -336,17 +304,16 @@ module Jekyll
|
||||
require "webrick/https"
|
||||
|
||||
opts[:SSLCertificate] = OpenSSL::X509::Certificate.new(read_file(src, cert))
|
||||
opts[:SSLPrivateKey ] = OpenSSL::PKey::RSA.new(read_file(src, key))
|
||||
opts[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(read_file(src, key))
|
||||
opts[:SSLEnable] = true
|
||||
end
|
||||
|
||||
private
|
||||
def start_callback(detached)
|
||||
unless detached
|
||||
proc do
|
||||
mutex.synchronize do
|
||||
# Block until EventMachine reactor starts
|
||||
@reload_reactor.started_event.wait unless @reload_reactor.nil?
|
||||
@reload_reactor&.started_event&.wait
|
||||
@running = true
|
||||
Jekyll.logger.info("Server running...", "press ctrl-c to stop.")
|
||||
@run_cond.broadcast
|
||||
@@ -355,7 +322,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def stop_callback(detached)
|
||||
unless detached
|
||||
proc do
|
||||
@@ -371,13 +337,11 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def mime_types
|
||||
file = File.expand_path("../mime.types", __dir__)
|
||||
WEBrick::HTTPUtils.load_mime_types(file)
|
||||
end
|
||||
|
||||
private
|
||||
def read_file(source_dir, file_path)
|
||||
File.read(Jekyll.sanitized_path(source_dir, file_path))
|
||||
end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "json"
|
||||
require "em-websocket"
|
||||
|
||||
require_relative "websockets"
|
||||
@@ -31,11 +30,11 @@ module Jekyll
|
||||
EM.reactor_running?
|
||||
end
|
||||
|
||||
def handle_websockets_event(ws)
|
||||
ws.onopen { |handshake| connect(ws, handshake) }
|
||||
ws.onclose { disconnect(ws) }
|
||||
ws.onmessage { |msg| print_message(msg) }
|
||||
ws.onerror { |error| log_error(error) }
|
||||
def handle_websockets_event(websocket)
|
||||
websocket.onopen { |handshake| connect(websocket, handshake) }
|
||||
websocket.onclose { disconnect(websocket) }
|
||||
websocket.onmessage { |msg| print_message(msg) }
|
||||
websocket.onerror { |error| log_error(error) }
|
||||
end
|
||||
|
||||
def start(opts)
|
||||
@@ -59,7 +58,7 @@ module Jekyll
|
||||
EM.add_shutdown_hook { @stopped_event.set }
|
||||
|
||||
Jekyll.logger.info "LiveReload address:",
|
||||
"http://#{opts["host"]}:#{opts["livereload_port"]}"
|
||||
"http://#{opts["host"]}:#{opts["livereload_port"]}"
|
||||
end
|
||||
end
|
||||
@thread.abort_on_exception = true
|
||||
@@ -69,11 +68,11 @@ module Jekyll
|
||||
# http://feedback.livereload.com/knowledgebase/articles/86174-livereload-protocol
|
||||
def reload(pages)
|
||||
pages.each do |p|
|
||||
json_message = JSON.dump({
|
||||
json_message = JSON.dump(
|
||||
:command => "reload",
|
||||
:path => p.url,
|
||||
:liveCSS => true,
|
||||
})
|
||||
:liveCSS => true
|
||||
)
|
||||
|
||||
Jekyll.logger.debug "LiveReload:", "Reloading #{p.url}"
|
||||
Jekyll.logger.debug "", json_message
|
||||
@@ -82,14 +81,15 @@ module Jekyll
|
||||
end
|
||||
|
||||
private
|
||||
def connect(ws, handshake)
|
||||
|
||||
def connect(websocket, handshake)
|
||||
@connections_count += 1
|
||||
if @connections_count == 1
|
||||
message = "Browser connected"
|
||||
message += " over SSL/TLS" if handshake.secure?
|
||||
Jekyll.logger.info "LiveReload:", message
|
||||
end
|
||||
ws.send(
|
||||
websocket.send(
|
||||
JSON.dump(
|
||||
:command => "hello",
|
||||
:protocols => ["http://livereload.com/protocols/official-7"],
|
||||
@@ -97,29 +97,24 @@ module Jekyll
|
||||
)
|
||||
)
|
||||
|
||||
@websockets << ws
|
||||
@websockets << websocket
|
||||
end
|
||||
|
||||
private
|
||||
def disconnect(ws)
|
||||
@websockets.delete(ws)
|
||||
def disconnect(websocket)
|
||||
@websockets.delete(websocket)
|
||||
end
|
||||
|
||||
private
|
||||
def print_message(json_message)
|
||||
msg = JSON.parse(json_message)
|
||||
# Not sure what the 'url' command even does in LiveReload. The spec is silent
|
||||
# on its purpose.
|
||||
if msg["command"] == "url"
|
||||
Jekyll.logger.info "LiveReload:", "Browser URL: #{msg["url"]}"
|
||||
end
|
||||
Jekyll.logger.info "LiveReload:", "Browser URL: #{msg["url"]}" if msg["command"] == "url"
|
||||
end
|
||||
|
||||
private
|
||||
def log_error(e)
|
||||
def log_error(error)
|
||||
Jekyll.logger.error "LiveReload experienced an error. " \
|
||||
"Run with --trace for more information."
|
||||
raise e
|
||||
raise error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,6 +88,7 @@ module Jekyll
|
||||
end
|
||||
@new_body = @new_body.join
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def template
|
||||
# Unclear what "snipver" does. Doc at
|
||||
@@ -120,9 +121,7 @@ module Jekyll
|
||||
if @options["livereload_max_delay"]
|
||||
src += "&maxdelay=#{@options["livereload_max_delay"]}"
|
||||
end
|
||||
if @options["livereload_port"]
|
||||
src += "&port=#{@options["livereload_port"]}"
|
||||
end
|
||||
src += "&port=#{@options["livereload_port"]}" if @options["livereload_port"]
|
||||
src
|
||||
end
|
||||
end
|
||||
@@ -175,10 +174,10 @@ module Jekyll
|
||||
res.header.merge!(@headers)
|
||||
rtn
|
||||
end
|
||||
|
||||
#
|
||||
# rubocop:enable Naming/MethodName
|
||||
|
||||
private
|
||||
|
||||
def validate_and_ensure_charset(_req, res)
|
||||
key = res.header.keys.grep(%r!content-type!i).first
|
||||
typ = res.header[key]
|
||||
@@ -188,9 +187,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
private
|
||||
def set_defaults
|
||||
hash_ = @jekyll_opts.fetch("webrick", {}).fetch("headers", {})
|
||||
DEFAULTS.each_with_object(@headers = hash_) do |(key, val), hash|
|
||||
|
||||
@@ -74,6 +74,7 @@ module Jekyll
|
||||
close_connection_after_writing
|
||||
end
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,6 +9,7 @@ module Jekyll
|
||||
"source" => Dir.pwd,
|
||||
"destination" => File.join(Dir.pwd, "_site"),
|
||||
"collections_dir" => "",
|
||||
"cache_dir" => ".jekyll-cache",
|
||||
"plugins_dir" => "_plugins",
|
||||
"layouts_dir" => "_layouts",
|
||||
"data_dir" => "_data",
|
||||
@@ -61,15 +62,9 @@ module Jekyll
|
||||
"defaults" => [],
|
||||
|
||||
"liquid" => {
|
||||
"error_mode" => "warn",
|
||||
},
|
||||
|
||||
"rdiscount" => {
|
||||
"extensions" => [],
|
||||
},
|
||||
|
||||
"redcarpet" => {
|
||||
"extensions" => [],
|
||||
"error_mode" => "warn",
|
||||
"strict_filters" => false,
|
||||
"strict_variables" => false,
|
||||
},
|
||||
|
||||
"kramdown" => {
|
||||
@@ -284,6 +279,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def style_to_permalink(permalink_style)
|
||||
case permalink_style.to_sym
|
||||
when :pretty
|
||||
@@ -305,14 +301,12 @@ module Jekyll
|
||||
# file - the file from which the config was extracted
|
||||
#
|
||||
# Raises an ArgumentError if given config is not a hash
|
||||
private
|
||||
def check_config_is_hash!(extracted_config, file)
|
||||
unless extracted_config.is_a?(Hash)
|
||||
raise ArgumentError, "Configuration file: (INVALID) #{file}".yellow
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_auto(config)
|
||||
if config.key?("auto") || config.key?("watch")
|
||||
Jekyll::Deprecator.deprecation_message "Auto-regeneration can no longer" \
|
||||
@@ -323,7 +317,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_server(config)
|
||||
if config.key?("server")
|
||||
Jekyll::Deprecator.deprecation_message "The 'server' configuration option" \
|
||||
@@ -333,7 +326,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_pygments(config)
|
||||
if config.key?("pygments")
|
||||
Jekyll::Deprecator.deprecation_message "The 'pygments' configuration option" \
|
||||
@@ -346,7 +338,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_include_exclude(config)
|
||||
%w(include exclude).each do |option|
|
||||
if config[option].is_a?(String)
|
||||
@@ -356,11 +347,10 @@ module Jekyll
|
||||
" as a list of comma-separated values."
|
||||
config[option] = csv_to_array(config[option])
|
||||
end
|
||||
config[option].map!(&:to_s) if config[option]
|
||||
config[option]&.map!(&:to_s)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_coderay(config)
|
||||
if (config["kramdown"] || {}).key?("use_coderay")
|
||||
Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" \
|
||||
@@ -369,7 +359,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_maruku(config)
|
||||
if config.fetch("markdown", "kramdown").to_s.casecmp("maruku").zero?
|
||||
Jekyll.logger.abort_with "Error:", "You're using the 'maruku' " \
|
||||
@@ -386,7 +375,6 @@ module Jekyll
|
||||
#
|
||||
# Raises a Jekyll::Errors::InvalidConfigurationError if the config `plugins`
|
||||
# is a string
|
||||
private
|
||||
def check_plugins(config)
|
||||
if config.key?("plugins") && config["plugins"].is_a?(String)
|
||||
Jekyll.logger.error "Configuration Error:", "You specified the" \
|
||||
@@ -394,8 +382,8 @@ module Jekyll
|
||||
" use an array instead. If you wanted to set the directory of your" \
|
||||
" plugins, use the config key `plugins_dir` instead."
|
||||
raise Jekyll::Errors::InvalidConfigurationError,
|
||||
"'plugins' should not be a string, but was: " \
|
||||
"#{config["plugins"].inspect}. Use 'plugins_dir' instead."
|
||||
"'plugins' should not be a string, but was: " \
|
||||
"#{config["plugins"].inspect}. Use 'plugins_dir' instead."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,9 +11,7 @@ module Jekyll
|
||||
return if @setup ||= false
|
||||
unless (@parser = get_processor)
|
||||
Jekyll.logger.error "Invalid Markdown processor given:", @config["markdown"]
|
||||
if @config["safe"]
|
||||
Jekyll.logger.info "", "Custom processors are not loaded in safe mode"
|
||||
end
|
||||
Jekyll.logger.info "", "Custom processors are not loaded in safe mode" if @config["safe"]
|
||||
Jekyll.logger.error(
|
||||
"",
|
||||
"Available processors are: #{valid_processors.join(", ")}"
|
||||
@@ -21,6 +19,8 @@ module Jekyll
|
||||
raise Errors::FatalException, "Bailing out; invalid Markdown processor."
|
||||
end
|
||||
|
||||
@cache = Jekyll::Cache.new("Jekyll::Converters::Markdown")
|
||||
|
||||
@setup = true
|
||||
end
|
||||
|
||||
@@ -30,9 +30,7 @@ module Jekyll
|
||||
# rubocop:disable Naming/AccessorMethodName
|
||||
def get_processor
|
||||
case @config["markdown"].downcase
|
||||
when "redcarpet" then return RedcarpetParser.new(@config)
|
||||
when "kramdown" then return KramdownParser.new(@config)
|
||||
when "rdiscount" then return RDiscountParser.new(@config)
|
||||
when "kramdown" then KramdownParser.new(@config)
|
||||
else
|
||||
custom_processor
|
||||
end
|
||||
@@ -44,7 +42,7 @@ module Jekyll
|
||||
# are not in safe mode.)
|
||||
|
||||
def valid_processors
|
||||
%w(rdiscount kramdown redcarpet) + third_party_processors
|
||||
%w(kramdown) + third_party_processors
|
||||
end
|
||||
|
||||
# Public: A list of processors that you provide via plugins.
|
||||
@@ -53,7 +51,7 @@ module Jekyll
|
||||
|
||||
def third_party_processors
|
||||
self.class.constants - \
|
||||
%w(KramdownParser RDiscountParser RedcarpetParser PRIORITIES).map(
|
||||
%w(KramdownParser PRIORITIES).map(
|
||||
&:to_sym
|
||||
)
|
||||
end
|
||||
@@ -74,15 +72,16 @@ module Jekyll
|
||||
|
||||
def convert(content)
|
||||
setup
|
||||
@parser.convert(content)
|
||||
@cache.getset(content) do
|
||||
@parser.convert(content)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def custom_processor
|
||||
converter_name = @config["markdown"]
|
||||
if custom_class_allowed?(converter_name)
|
||||
self.class.const_get(converter_name).new(@config)
|
||||
end
|
||||
self.class.const_get(converter_name).new(@config) if custom_class_allowed?(converter_name)
|
||||
end
|
||||
|
||||
# Private: Determine whether a class name is an allowed custom
|
||||
@@ -92,8 +91,6 @@ module Jekyll
|
||||
#
|
||||
# Returns true if the parser name contains only alphanumeric
|
||||
# characters and is defined within Jekyll::Converters::Markdown
|
||||
|
||||
private
|
||||
def custom_class_allowed?(parser_name)
|
||||
parser_name !~ %r![^A-Za-z0-9_]! && self.class.constants.include?(
|
||||
parser_name.to_sym
|
||||
|
||||
@@ -14,9 +14,6 @@ module Jekyll
|
||||
}.freeze
|
||||
|
||||
def initialize(config)
|
||||
unless defined?(Kramdown)
|
||||
Jekyll::External.require_with_graceful_fail "kramdown"
|
||||
end
|
||||
@main_fallback_highlighter = config["highlighter"] || "rouge"
|
||||
@config = config["kramdown"] || {}
|
||||
@highlighter = nil
|
||||
@@ -50,22 +47,19 @@ module Jekyll
|
||||
end
|
||||
|
||||
private
|
||||
# rubocop:disable Performance/HashEachMethods
|
||||
|
||||
def make_accessible(hash = @config)
|
||||
hash.keys.each do |key|
|
||||
hash[key.to_sym] = hash[key]
|
||||
make_accessible(hash[key]) if hash[key].is_a?(Hash)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Performance/HashEachMethods
|
||||
|
||||
# config[kramdown][syntax_higlighter] >
|
||||
# config[kramdown][enable_coderay] >
|
||||
# config[highlighter]
|
||||
# Where `enable_coderay` is now deprecated because Kramdown
|
||||
# supports Rouge now too.
|
||||
|
||||
private
|
||||
def highlighter
|
||||
return @highlighter if @highlighter
|
||||
|
||||
@@ -89,7 +83,6 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def strip_coderay_prefix(hash)
|
||||
hash.each_with_object({}) do |(key, val), hsh|
|
||||
cleaned_key = key.to_s.gsub(%r!\Acoderay_!, "")
|
||||
@@ -107,8 +100,6 @@ module Jekyll
|
||||
# If our highlighter is CodeRay we go in to merge the CodeRay defaults
|
||||
# with your "coderay" key if it's there, deprecating it in the
|
||||
# process of you using it.
|
||||
|
||||
private
|
||||
def modernize_coderay_config
|
||||
unless @config["coderay"].empty?
|
||||
Jekyll::Deprecator.deprecation_message(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user