Plugins can be specified as a list of directories to scan. #438

merged 3 commits into from Jan 29, 2012


None yet
3 participants

simensen commented Nov 22, 2011

This will allow for maintaining a repository of plugins that several Jekyll sites can reference.


simensen commented Nov 23, 2011

Is this something there is any interest in? I would be happy to change it as needed if another implementation if preferred.

- self.plugins = File.expand_path(config['plugins'])
+ self.plugins = if config['plugins'].respond_to?('each')
+ # If plugins is an array, process it.
+ config['plugins'].each { |directory| File.expand_path(directory) }

mojombo Jan 22, 2012


This isn't doing what you expect. You need to use Array#map to get the correct result. This would also be better written using the Array method:

Array(config['plugins']).map { |d| File.expand_path(d) }

mojombo commented Jan 22, 2012

I'd love to see this rewritten with the comments above and with a few tests to verify it's working as advertised.


simensen commented Jan 23, 2012

OK, I went ahead and took a crack at this. Let me know if you'd like anything else changed or would like some additional testing done or would like the testing to be done differently.

@mojombo mojombo merged commit e6d89c6 into jekyll:master Jan 29, 2012


mojombo commented Jan 29, 2012

Thanks for getting those tests in. I've merged this with some changes in 4499df8 to do what I was trying to communicate earlier.


simensen commented Jan 29, 2012

Great! Thanks. I'm still pretty new to Ruby so I wasn't exactly sure what you were suggesting. I guess Array can accept either a string or an array? Neat. :) Thanks again!

@pathawks pathawks referenced this pull request Jan 5, 2017


Remove broken test #5724

@jekyllbot jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.