Skip to content

Commit 4499df8

Browse files
committed
Shorten plugin loading code and update history.
1 parent 02366ae commit 4499df8

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

History.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Add --default-mimetype option (#279)
55
* Allow setting of RedCloth options (#284)
66
* Add post_url Liquid tag for internal post linking (#369)
7+
* Allow multiple plugin dirs to be specified (#438)
78
* Bug Fixes
89
* Allow some special characters in highlight names
910
* URL escape category names in URL generation (#360)

lib/jekyll/site.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,7 @@ def initialize(config)
1818
self.safe = config['safe']
1919
self.source = File.expand_path(config['source'])
2020
self.dest = File.expand_path(config['destination'])
21-
self.plugins = if config['plugins'].respond_to?('each')
22-
# If plugins is an array, process it.
23-
Array(config['plugins']).map { |d| File.expand_path(d) }
24-
else
25-
if config['plugins'].nil?
26-
[]
27-
else
28-
# Otherwise process a single entry as an array.
29-
[File.expand_path(config['plugins'])]
30-
end
31-
end
21+
self.plugins = Array(config['plugins']).map { |d| File.expand_path(d) }
3222
self.lsi = config['lsi']
3323
self.pygments = config['pygments']
3424
self.permalink_style = config['permalink'].to_sym

0 commit comments

Comments
 (0)