jekyll 3.1.6 → 3.2.0.pre.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jekyll might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +200 -74
- data/README.markdown +13 -13
- data/lib/jekyll.rb +12 -8
- data/lib/jekyll/cleaner.rb +11 -8
- data/lib/jekyll/collection.rb +3 -3
- data/lib/jekyll/commands/build.rb +15 -12
- data/lib/jekyll/commands/clean.rb +15 -16
- data/lib/jekyll/commands/doctor.rb +7 -7
- data/lib/jekyll/commands/help.rb +4 -3
- data/lib/jekyll/commands/new.rb +49 -14
- data/lib/jekyll/commands/new_theme.rb +33 -0
- data/lib/jekyll/commands/serve.rb +33 -27
- data/lib/jekyll/commands/serve/servlet.rb +2 -3
- data/lib/jekyll/configuration.rb +10 -34
- data/lib/jekyll/converter.rb +6 -2
- data/lib/jekyll/converters/markdown.rb +1 -1
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -0
- data/lib/jekyll/convertible.rb +6 -9
- data/lib/jekyll/document.rb +5 -1
- data/lib/jekyll/drops/document_drop.rb +7 -33
- data/lib/jekyll/drops/drop.rb +2 -26
- data/lib/jekyll/drops/jekyll_drop.rb +0 -12
- data/lib/jekyll/drops/site_drop.rb +1 -1
- data/lib/jekyll/entry_filter.rb +61 -15
- data/lib/jekyll/errors.rb +6 -0
- data/lib/jekyll/excerpt.rb +5 -2
- data/lib/jekyll/filters.rb +49 -8
- data/lib/jekyll/frontmatter_defaults.rb +2 -2
- data/lib/jekyll/hooks.rb +1 -0
- data/lib/jekyll/layout.rb +16 -1
- data/lib/jekyll/page.rb +1 -0
- data/lib/jekyll/plugin.rb +1 -1
- data/lib/jekyll/plugin_manager.rb +5 -5
- data/lib/jekyll/publisher.rb +4 -4
- data/lib/jekyll/readers/data_reader.rb +3 -2
- data/lib/jekyll/readers/layout_reader.rb +19 -3
- data/lib/jekyll/readers/post_reader.rb +5 -1
- data/lib/jekyll/regenerator.rb +5 -3
- data/lib/jekyll/renderer.rb +4 -6
- data/lib/jekyll/site.rb +47 -18
- data/lib/jekyll/static_file.rb +5 -1
- data/lib/jekyll/tags/include.rb +33 -31
- data/lib/jekyll/tags/link.rb +26 -0
- data/lib/jekyll/tags/post_url.rb +18 -8
- data/lib/jekyll/theme.rb +56 -0
- data/lib/jekyll/theme_builder.rb +117 -0
- data/lib/jekyll/utils.rb +2 -14
- data/lib/jekyll/version.rb +1 -1
- data/lib/site_template/_config.yml +8 -2
- data/lib/site_template/_includes/footer.html +3 -3
- data/lib/site_template/_includes/head.html +2 -2
- data/lib/site_template/_includes/header.html +3 -3
- data/lib/site_template/_layouts/default.html +3 -3
- data/lib/site_template/_layouts/page.html +1 -1
- data/lib/site_template/_layouts/post.html +1 -1
- data/lib/site_template/_sass/_base.scss +11 -17
- data/lib/site_template/index.html +1 -1
- data/lib/theme_template/CODE_OF_CONDUCT.md.erb +74 -0
- data/lib/theme_template/Gemfile +2 -0
- data/lib/theme_template/LICENSE.txt.erb +21 -0
- data/lib/theme_template/README.md.erb +46 -0
- data/lib/theme_template/Rakefile.erb +74 -0
- data/lib/theme_template/example/_config.yml.erb +1 -0
- data/lib/theme_template/example/_post.md +13 -0
- data/lib/theme_template/example/index.html +14 -0
- data/lib/theme_template/example/style.scss +7 -0
- data/lib/theme_template/theme.gemspec.erb +22 -0
- metadata +34 -7
- data/lib/jekyll/drops/excerpt_drop.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7707dfb4ade1518698a36a852ac7cd164d8f094
|
4
|
+
data.tar.gz: afad1c82e3c93f9e33c6c307d572810e088516f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b2878e2d752a8cab1997381fe0dd999562c77dbba4d7fb19d52c0c24fe82c726508cbb4e22e3f48e5b9d793e981fb67a6e7bb2707754cbbf8ec8ac780b22a9
|
7
|
+
data.tar.gz: b463648247640ca9d3f60bb25a592cfd0569bce4627fd6cd2396ec394eb123fe352620472c8d1e4dab1b2edc66844f1c1d2f5d7e1896834b4c377b8ba3744f2d
|
data/.rubocop.yml
CHANGED
@@ -1,80 +1,206 @@
|
|
1
|
-
|
2
|
-
Metrics/ClassLength: { Max: 240 }
|
3
|
-
Metrics/ModuleLength: { Max: 240 }
|
4
|
-
Metrics/LineLength: { Max: 112 }
|
5
|
-
Metrics/CyclomaticComplexity: { Max: 8 }
|
6
|
-
Metrics/PerceivedComplexity: { Max: 8 }
|
7
|
-
Metrics/ParameterLists: { Max: 4 }
|
8
|
-
Metrics/MethodLength: { Max: 24 }
|
9
|
-
Metrics/AbcSize: { Max: 20 }
|
10
|
-
|
11
|
-
Style/IndentHash: { EnforcedStyle: consistent }
|
12
|
-
Style/HashSyntax: { EnforcedStyle: hash_rockets }
|
13
|
-
Style/SignalException: { EnforcedStyle: only_raise }
|
14
|
-
Style/AlignParameters: { EnforcedStyle: with_fixed_indentation }
|
15
|
-
Style/StringLiteralsInInterpolation: { EnforcedStyle: double_quotes }
|
16
|
-
Style/MultilineMethodCallIndentation: { EnforcedStyle: indented }
|
17
|
-
Style/MultilineOperationIndentation: { EnforcedStyle: indented }
|
18
|
-
Style/FirstParameterIndentation: { EnforcedStyle: consistent }
|
19
|
-
Style/StringLiterals: { EnforcedStyle: double_quotes }
|
20
|
-
Style/RegexpLiteral: { EnforcedStyle: slashes }
|
21
|
-
Style/IndentArray: { EnforcedStyle: consistent }
|
22
|
-
Style/ExtraSpacing: { AllowForAlignment: true }
|
23
|
-
|
24
|
-
Style/PercentLiteralDelimiters:
|
25
|
-
PreferredDelimiters:
|
26
|
-
'%q': '{}'
|
27
|
-
'%Q': '{}'
|
28
|
-
'%r': '!!'
|
29
|
-
'%s': '()'
|
30
|
-
'%w': '()'
|
31
|
-
'%W': '()'
|
32
|
-
'%x': '()'
|
33
|
-
|
34
|
-
Style/AlignArray: { Enabled: false }
|
35
|
-
Style/StringLiterals: { Enabled: false }
|
36
|
-
Style/Documentation: { Enabled: false }
|
37
|
-
Style/DoubleNegation: { Enabled: false }
|
38
|
-
Style/UnneededCapitalW: { Enabled: false }
|
39
|
-
Style/EmptyLinesAroundModuleBody: { Enabled: false }
|
40
|
-
Style/EmptyLinesAroundAccessModifier: { Enabled: false }
|
41
|
-
Style/BracesAroundHashParameters: { Enabled: false }
|
42
|
-
Style/SpaceInsideBrackets: { Enabled: false }
|
43
|
-
Style/IfUnlessModifier: { Enabled: false }
|
44
|
-
Style/ModuleFunction: { Enabled: false }
|
45
|
-
Style/RescueModifier: { Enabled: false }
|
46
|
-
Style/GuardClause: { Enabled: false }
|
47
|
-
Style/FileName: { Enabled: false }
|
48
|
-
Lint/UselessAccessModifier: { Enabled: false }
|
49
|
-
Style/SpaceAroundOperators: { Enabled: false }
|
50
|
-
Style/RedundantReturn: { Enabled: false }
|
51
|
-
Style/SingleLineMethods: { Enabled: false }
|
52
|
-
|
1
|
+
---
|
53
2
|
AllCops:
|
54
3
|
TargetRubyVersion: 2.0
|
55
4
|
Include:
|
56
5
|
- lib/**/*.rb
|
57
|
-
|
58
6
|
Exclude:
|
59
|
-
- .
|
60
|
-
- .
|
61
|
-
- .
|
62
|
-
- .
|
63
|
-
- .
|
64
|
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
-
|
74
|
-
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
78
|
-
-
|
7
|
+
- lib/jekyll/collection.rb
|
8
|
+
- lib/jekyll/command.rb
|
9
|
+
- lib/jekyll/configuration.rb
|
10
|
+
- lib/jekyll/converter.rb
|
11
|
+
- lib/jekyll/converters/identity.rb
|
12
|
+
- lib/jekyll/converters/markdown
|
13
|
+
- lib/jekyll/converters/markdown/kramdown_parser.rb
|
14
|
+
- lib/jekyll/converters/markdown/rdiscount_parser.rb
|
15
|
+
- lib/jekyll/converters/markdown/redcarpet_parser.rb
|
16
|
+
- lib/jekyll/converters/markdown.rb
|
17
|
+
- lib/jekyll/converters/smartypants.rb
|
18
|
+
- lib/jekyll/convertible.rb
|
19
|
+
- lib/jekyll/deprecator.rb
|
20
|
+
- lib/jekyll/document.rb
|
21
|
+
- lib/jekyll/drops/collection_drop.rb
|
22
|
+
- lib/jekyll/drops/document_drop.rb
|
23
|
+
- lib/jekyll/drops/drop.rb
|
24
|
+
- lib/jekyll/drops/jekyll_drop.rb
|
25
|
+
- lib/jekyll/drops/site_drop.rb
|
26
|
+
- lib/jekyll/drops/unified_payload_drop.rb
|
27
|
+
- lib/jekyll/drops/url_drop.rb
|
28
|
+
- lib/jekyll/entry_filter.rb
|
29
|
+
- lib/jekyll/errors.rb
|
30
|
+
- lib/jekyll/excerpt.rb
|
31
|
+
- lib/jekyll/external.rb
|
32
|
+
- lib/jekyll/filters.rb
|
33
|
+
- lib/jekyll/frontmatter_defaults.rb
|
34
|
+
- lib/jekyll/generator.rb
|
35
|
+
- lib/jekyll/hooks.rb
|
36
|
+
- lib/jekyll/layout.rb
|
37
|
+
- lib/jekyll/liquid_extensions.rb
|
38
|
+
- lib/jekyll/liquid_renderer/file.rb
|
39
|
+
- lib/jekyll/liquid_renderer/table.rb
|
40
|
+
- lib/jekyll/liquid_renderer.rb
|
41
|
+
- lib/jekyll/log_adapter.rb
|
42
|
+
- lib/jekyll/page.rb
|
43
|
+
- lib/jekyll/plugin.rb
|
44
|
+
- lib/jekyll/plugin_manager.rb
|
45
|
+
- lib/jekyll/publisher.rb
|
46
|
+
- lib/jekyll/reader.rb
|
47
|
+
- lib/jekyll/readers/collection_reader.rb
|
48
|
+
- lib/jekyll/readers/data_reader.rb
|
49
|
+
- lib/jekyll/readers/layout_reader.rb
|
50
|
+
- lib/jekyll/readers/page_reader.rb
|
51
|
+
- lib/jekyll/readers/post_reader.rb
|
52
|
+
- lib/jekyll/readers/static_file_reader.rb
|
53
|
+
- lib/jekyll/regenerator.rb
|
54
|
+
- lib/jekyll/related_posts.rb
|
55
|
+
- lib/jekyll/renderer.rb
|
56
|
+
- lib/jekyll/site.rb
|
57
|
+
- lib/jekyll/static_file.rb
|
58
|
+
- lib/jekyll/stevenson.rb
|
59
|
+
- lib/jekyll/tags/highlight.rb
|
60
|
+
- lib/jekyll/tags/include.rb
|
61
|
+
- lib/jekyll/tags/link.rb
|
62
|
+
- lib/jekyll/tags/post_url.rb
|
63
|
+
- lib/jekyll/theme.rb
|
64
|
+
- lib/jekyll/url.rb
|
65
|
+
- lib/jekyll/utils/ansi.rb
|
66
|
+
- lib/jekyll/utils/platforms.rb
|
67
|
+
- lib/jekyll/utils.rb
|
68
|
+
- lib/jekyll/version.rb
|
69
|
+
- lib/jekyll.rb
|
70
|
+
- features/step_definitions.rb
|
71
|
+
- features/support/formatter.rb
|
72
|
+
- features/support/helpers.rb
|
73
|
+
- test/test_configuration.rb
|
74
|
+
- test/test_document.rb
|
75
|
+
- test/test_entry_filter.rb
|
76
|
+
- test/test_filters.rb
|
77
|
+
- test/test_kramdown.rb
|
78
|
+
- test/test_liquid_renderer.rb
|
79
|
+
- test/test_page.rb
|
80
|
+
- test/test_regenerator.rb
|
81
|
+
- test/test_related_posts.rb
|
82
|
+
- test/test_sass.rb
|
83
|
+
- test/test_site.rb
|
84
|
+
- test/test_static_file.rb
|
85
|
+
- test/test_tags.rb
|
86
|
+
- test/test_theme.rb
|
87
|
+
- test/test_url.rb
|
88
|
+
- test/test_utils.rb
|
89
|
+
- bin/**/*
|
90
|
+
- benchmark/**/*
|
79
91
|
- script/**/*
|
80
|
-
-
|
92
|
+
- vendor/**/*
|
93
|
+
Lint/EndAlignment:
|
94
|
+
Severity: error
|
95
|
+
Lint/UnreachableCode:
|
96
|
+
Severity: error
|
97
|
+
Lint/UselessAccessModifier:
|
98
|
+
Enabled: false
|
99
|
+
Metrics/AbcSize:
|
100
|
+
Max: 20
|
101
|
+
Metrics/ClassLength:
|
102
|
+
Max: 240
|
103
|
+
Exclude:
|
104
|
+
- !ruby/regexp /features\/.*.rb$/
|
105
|
+
Metrics/CyclomaticComplexity:
|
106
|
+
Max: 8
|
107
|
+
Metrics/LineLength:
|
108
|
+
Max: 90
|
109
|
+
Severity: warning
|
110
|
+
Exclude:
|
111
|
+
- !ruby/regexp /features\/.*.rb/
|
112
|
+
Metrics/MethodLength:
|
113
|
+
Max: 20
|
114
|
+
CountComments: false
|
115
|
+
Severity: error
|
116
|
+
Metrics/ModuleLength:
|
117
|
+
Max: 240
|
118
|
+
Metrics/ParameterLists:
|
119
|
+
Max: 4
|
120
|
+
Metrics/PerceivedComplexity:
|
121
|
+
Max: 8
|
122
|
+
Style/Alias:
|
123
|
+
Enabled: false
|
124
|
+
Style/AlignArray:
|
125
|
+
Enabled: false
|
126
|
+
Style/AlignHash:
|
127
|
+
EnforcedHashRocketStyle: table
|
128
|
+
Style/AlignParameters:
|
129
|
+
EnforcedStyle: with_fixed_indentation
|
130
|
+
Enabled: false
|
131
|
+
Style/AndOr:
|
132
|
+
Severity: error
|
133
|
+
Style/Attr:
|
134
|
+
Enabled: false
|
135
|
+
Style/BracesAroundHashParameters:
|
136
|
+
Enabled: false
|
137
|
+
Style/ClassAndModuleChildren:
|
138
|
+
Enabled: false
|
139
|
+
Style/Documentation:
|
140
|
+
Enabled: false
|
141
|
+
Exclude:
|
142
|
+
- !ruby/regexp /features\/.*.rb$/
|
143
|
+
Style/DoubleNegation:
|
144
|
+
Enabled: false
|
145
|
+
Style/EmptyLinesAroundAccessModifier:
|
146
|
+
Enabled: false
|
147
|
+
Style/EmptyLinesAroundModuleBody:
|
148
|
+
Enabled: false
|
149
|
+
Style/ExtraSpacing:
|
150
|
+
AllowForAlignment: true
|
151
|
+
Style/FileName:
|
152
|
+
Enabled: false
|
153
|
+
Style/FirstParameterIndentation:
|
154
|
+
EnforcedStyle: consistent
|
155
|
+
Style/GuardClause:
|
156
|
+
Enabled: false
|
157
|
+
Style/HashSyntax:
|
158
|
+
EnforcedStyle: hash_rockets
|
159
|
+
Severity: error
|
160
|
+
Style/IfUnlessModifier:
|
161
|
+
Enabled: false
|
162
|
+
Style/IndentArray:
|
163
|
+
EnforcedStyle: consistent
|
164
|
+
Style/IndentHash:
|
165
|
+
EnforcedStyle: consistent
|
166
|
+
Style/IndentationWidth:
|
167
|
+
Severity: error
|
168
|
+
Style/ModuleFunction:
|
169
|
+
Enabled: false
|
170
|
+
Style/MultilineMethodCallIndentation:
|
171
|
+
EnforcedStyle: indented
|
172
|
+
Style/MultilineOperationIndentation:
|
173
|
+
EnforcedStyle: indented
|
174
|
+
Style/MultilineTernaryOperator:
|
175
|
+
Severity: error
|
176
|
+
Style/PercentLiteralDelimiters:
|
177
|
+
PreferredDelimiters:
|
178
|
+
"%q": "{}"
|
179
|
+
"%Q": "{}"
|
180
|
+
"%r": "!!"
|
181
|
+
"%s": "()"
|
182
|
+
"%w": "()"
|
183
|
+
"%W": "()"
|
184
|
+
"%x": "()"
|
185
|
+
Style/RedundantReturn:
|
186
|
+
Enabled: false
|
187
|
+
Style/RedundantSelf:
|
188
|
+
Enabled: false
|
189
|
+
Style/RegexpLiteral:
|
190
|
+
EnforcedStyle: slashes
|
191
|
+
Style/RescueModifier:
|
192
|
+
Enabled: false
|
193
|
+
Style/SignalException:
|
194
|
+
EnforcedStyle: only_raise
|
195
|
+
Style/SingleLineMethods:
|
196
|
+
Enabled: false
|
197
|
+
Style/SpaceAroundOperators:
|
198
|
+
Enabled: false
|
199
|
+
Style/SpaceInsideBrackets:
|
200
|
+
Enabled: false
|
201
|
+
Style/StringLiterals:
|
202
|
+
EnforcedStyle: double_quotes
|
203
|
+
Style/StringLiteralsInInterpolation:
|
204
|
+
EnforcedStyle: double_quotes
|
205
|
+
Style/UnneededCapitalW:
|
206
|
+
Enabled: false
|
data/README.markdown
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [Jekyll](
|
1
|
+
# [Jekyll](https://jekyllrb.com/)
|
2
2
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
|
4
4
|
[![Build Status](https://travis-ci.org/jekyll/jekyll.svg?branch=master)][travis]
|
@@ -14,7 +14,7 @@
|
|
14
14
|
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
|
15
15
|
[travis]: https://travis-ci.org/jekyll/jekyll
|
16
16
|
|
17
|
-
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](
|
17
|
+
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
|
18
18
|
|
19
19
|
## Philosophy
|
20
20
|
|
@@ -22,14 +22,14 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
|
|
22
22
|
|
23
23
|
## Having trouble with OS X El Capitan?
|
24
24
|
|
25
|
-
See:
|
25
|
+
See: https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
|
26
26
|
|
27
27
|
## Getting Started
|
28
28
|
|
29
|
-
* [Install](
|
30
|
-
* Read up about its [Usage](
|
29
|
+
* [Install](https://jekyllrb.com/docs/installation/) the gem
|
30
|
+
* Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
|
31
31
|
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
|
32
|
-
* Fork and [Contribute](
|
32
|
+
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
|
33
33
|
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
|
34
34
|
|
35
35
|
## Code of Conduct
|
@@ -41,18 +41,18 @@ conduct.
|
|
41
41
|
Please adhere to this code of conduct in any interactions you have in the
|
42
42
|
Jekyll community. It is strictly enforced on all official Jekyll
|
43
43
|
repositories, websites, and resources. If you encounter someone violating
|
44
|
-
these terms, please let a maintainer (@parkr, @envygeeks, or @mattr-) know
|
44
|
+
these terms, please let a maintainer ([@parkr](https://github.com/parkr), [@envygeeks](https://github.com/envygeeks), or [@mattr-](https://github.com/mattr-)) know
|
45
45
|
and we will address it as soon as possible.
|
46
46
|
|
47
47
|
## Diving In
|
48
48
|
|
49
49
|
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
|
50
|
-
* Learn how the [YAML Front Matter](
|
51
|
-
* Put information on your site with [Variables](
|
52
|
-
* Customize the [Permalinks](
|
53
|
-
* Use the built-in [Liquid Extensions](
|
54
|
-
* Use custom [Plugins](
|
50
|
+
* Learn how the [YAML Front Matter](https://jekyllrb.com/docs/frontmatter/) works
|
51
|
+
* Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
|
52
|
+
* Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
|
53
|
+
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
|
54
|
+
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
|
55
55
|
|
56
56
|
## License
|
57
57
|
|
58
|
-
See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).
|
58
|
+
See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
|
data/lib/jekyll.rb
CHANGED
@@ -7,7 +7,7 @@ $LOAD_PATH.unshift File.dirname(__FILE__) # For use/testing when no gem is insta
|
|
7
7
|
# Returns nothing.
|
8
8
|
def require_all(path)
|
9
9
|
glob = File.join(File.dirname(__FILE__), path, '*.rb')
|
10
|
-
Dir[glob].
|
10
|
+
Dir[glob].each do |f|
|
11
11
|
require f
|
12
12
|
end
|
13
13
|
end
|
@@ -16,6 +16,7 @@ end
|
|
16
16
|
require 'rubygems'
|
17
17
|
|
18
18
|
# stdlib
|
19
|
+
require "pathutil"
|
19
20
|
require 'forwardable'
|
20
21
|
require 'fileutils'
|
21
22
|
require 'time'
|
@@ -45,7 +46,6 @@ module Jekyll
|
|
45
46
|
autoload :Errors, 'jekyll/errors'
|
46
47
|
autoload :Excerpt, 'jekyll/excerpt'
|
47
48
|
autoload :External, 'jekyll/external'
|
48
|
-
autoload :Filters, 'jekyll/filters'
|
49
49
|
autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
|
50
50
|
autoload :Hooks, 'jekyll/hooks'
|
51
51
|
autoload :Layout, 'jekyll/layout'
|
@@ -67,6 +67,8 @@ module Jekyll
|
|
67
67
|
autoload :Site, 'jekyll/site'
|
68
68
|
autoload :StaticFile, 'jekyll/static_file'
|
69
69
|
autoload :Stevenson, 'jekyll/stevenson'
|
70
|
+
autoload :Theme, 'jekyll/theme'
|
71
|
+
autoload :ThemeBuilder, 'jekyll/theme_builder'
|
70
72
|
autoload :URL, 'jekyll/url'
|
71
73
|
autoload :Utils, 'jekyll/utils'
|
72
74
|
autoload :VERSION, 'jekyll/version'
|
@@ -77,6 +79,7 @@ module Jekyll
|
|
77
79
|
require 'jekyll/generator'
|
78
80
|
require 'jekyll/command'
|
79
81
|
require 'jekyll/liquid_extensions'
|
82
|
+
require "jekyll/filters"
|
80
83
|
|
81
84
|
class << self
|
82
85
|
# Public: Tells you which Jekyll environment you are building in so you can skip tasks
|
@@ -95,16 +98,18 @@ module Jekyll
|
|
95
98
|
# list of option names and their defaults.
|
96
99
|
#
|
97
100
|
# Returns the final configuration Hash.
|
98
|
-
def configuration(override =
|
99
|
-
config = Configuration
|
101
|
+
def configuration(override = {})
|
102
|
+
config = Configuration[Configuration::DEFAULTS]
|
103
|
+
override = Configuration[override].stringify_keys
|
100
104
|
unless override.delete('skip_config_files')
|
101
105
|
config = config.read_config_files(config.config_files(override))
|
102
106
|
end
|
103
107
|
|
104
108
|
# Merge DEFAULTS < _config.yml < override
|
105
|
-
|
106
|
-
|
107
|
-
|
109
|
+
config = Utils.deep_merge_hashes(config, override).stringify_keys
|
110
|
+
set_timezone(config['timezone']) if config['timezone']
|
111
|
+
|
112
|
+
config
|
108
113
|
end
|
109
114
|
|
110
115
|
# Public: Set the TZ environment variable to use the timezone specified
|
@@ -168,7 +173,6 @@ module Jekyll
|
|
168
173
|
end
|
169
174
|
|
170
175
|
require "jekyll/drops/drop"
|
171
|
-
require "jekyll/drops/document_drop"
|
172
176
|
require_all 'jekyll/commands'
|
173
177
|
require_all 'jekyll/converters'
|
174
178
|
require_all 'jekyll/converters/markdown'
|
data/lib/jekyll/cleaner.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
require
|
1
|
+
require "set"
|
2
2
|
|
3
3
|
module Jekyll
|
4
4
|
# Handles the cleanup of a site's destination before it is built.
|
5
5
|
class Cleaner
|
6
|
-
HIDDEN_FILE_REGEX =
|
6
|
+
HIDDEN_FILE_REGEX = %r!\/\.{1,2}$!
|
7
7
|
attr_reader :site
|
8
8
|
|
9
9
|
def initialize(site)
|
@@ -32,7 +32,8 @@ module Jekyll
|
|
32
32
|
[site.regenerator.metadata_file]
|
33
33
|
end
|
34
34
|
|
35
|
-
# Private: The list of existing files, apart from those included in
|
35
|
+
# Private: The list of existing files, apart from those included in
|
36
|
+
# keep_files and hidden files.
|
36
37
|
#
|
37
38
|
# Returns a Set with the file paths
|
38
39
|
def existing_files
|
@@ -77,15 +78,16 @@ module Jekyll
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
80
|
-
# Private: The list of existing files that will be replaced by a directory
|
81
|
+
# Private: The list of existing files that will be replaced by a directory
|
82
|
+
# during build
|
81
83
|
#
|
82
84
|
# Returns a Set with the file paths
|
83
85
|
def replaced_files
|
84
86
|
new_dirs.select { |dir| File.file?(dir) }.to_set
|
85
87
|
end
|
86
88
|
|
87
|
-
# Private: The list of directories that need to be kept because they are
|
88
|
-
# of files specified in keep_files
|
89
|
+
# Private: The list of directories that need to be kept because they are
|
90
|
+
# parent directories of files specified in keep_files
|
89
91
|
#
|
90
92
|
# Returns a Set with the directory paths
|
91
93
|
def keep_dirs
|
@@ -95,11 +97,12 @@ module Jekyll
|
|
95
97
|
# Private: Creates a regular expression from the config's keep_files array
|
96
98
|
#
|
97
99
|
# Examples
|
98
|
-
# ['.git','.svn']
|
100
|
+
# ['.git','.svn'] with site.dest "/myblog/_site" creates
|
101
|
+
# the following regex: /\A\/myblog\/_site\/(\.git|\/.svn)/
|
99
102
|
#
|
100
103
|
# Returns the regular expression
|
101
104
|
def keep_file_regex
|
102
|
-
Regexp.union(site.keep_files)
|
105
|
+
%r!\A#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})!
|
103
106
|
end
|
104
107
|
end
|
105
108
|
end
|