Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Jan 29, 2012

Conversation

Projects
None yet
3 participants
@simensen
Copy link
Contributor

simensen commented Nov 22, 2011

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

@simensen

This comment has been minimized.

Copy link
Contributor Author

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) }

This comment has been minimized.

Copy link
@mojombo

mojombo Jan 22, 2012

Contributor

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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

Closed

Remove broken test #5724

@jekyll jekyll 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.
You can’t perform that action at this time.