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

Look for plugins under the source directory #654

Merged
merged 9 commits into from Feb 26, 2013

Conversation

Projects
None yet
3 participants
@mattr-
Member

mattr- commented Oct 13, 2012

When generating the site, Jekyll will now look for plugins under the
source directory by default. The plugin location can still be changed in
_config.yml

This fixes issue #653

Look for plugins under the source directory
When generating the site, Jekyll will now look for plugins under the
source directory by default. The plugin location can still be changed in
_config.yml
@parkr

This comment has been minimized.

Member

parkr commented Dec 19, 2012

I think this is just meant to be the default. If source = Dir.pwd, then wouldn't plugins in the source directory be at the path we already have?

@mattr-

This comment has been minimized.

Member

mattr- commented Dec 19, 2012

Yes, it would. But this nicely handles the case where you have the following directory structure:

./blog
./blog/source
./blog/site
./blog/config.yml

and run Jekyll from ./blog

Also, I need to write tests for this. shame on me.

@parkr

This comment has been minimized.

Member

parkr commented Jan 10, 2013

I'd love to merge this in if you can rebase it and add tests :)

@mattr-

This comment has been minimized.

Member

mattr- commented Jan 30, 2013

Should I merge this up to current master again or will that be done by whomever merges it?

@parkr

This comment has been minimized.

Member

parkr commented Jan 30, 2013

The latter. Besides, GitHub is giving me a big, green "MERGE PULL REQUEST" button. :-)

@parkr

View changes

lib/jekyll/site.rb Outdated
@@ -101,6 +101,18 @@ def setup
end
end
# Internal: Setup the plugin search path
#

This comment has been minimized.

@parkr

parkr Jan 30, 2013

Member

Extraneous comment line?

This comment has been minimized.

@mattr-

mattr- Feb 25, 2013

Member

I thought TomDoc required a blank line here. IIRC, the spec is somewhat ambiguous about this. If it's not required, I'll happily remove it. 😄

This comment has been minimized.

@parkr

parkr Feb 25, 2013

Member

It needs one blank line between Internal: and Returns but that's it, I think!

@parkr

View changes

lib/jekyll/site.rb Outdated
#
#
# Returns an Array of plugin search paths
def setup_plugins

This comment has been minimized.

@parkr

parkr Jan 30, 2013

Member

This doesn't quite seem semantic enough. Why not just plugins_path or something? When I glanced at this, I thought it returned an array of all plugin paths or something.

This comment has been minimized.

@mattr-

mattr- Feb 25, 2013

Member

good point. will fix and update this week.

@parkr

View changes

test/test_site.rb Outdated
@@ -7,9 +7,9 @@ class TestSite < Test::Unit::TestCase
assert_equal [File.join(Dir.pwd, '_plugins')], site.plugins
end
should "have an array for plugins if passed as a string" do
site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => '/tmp/plugins'}))
assert_equal ['/tmp/plugins'], site.plugins

This comment has been minimized.

@parkr

parkr Jan 30, 2013

Member

Wait, why did you nix this one? This seems like it should still stand.

This comment has been minimized.

@mattr-

mattr- Feb 25, 2013

Member

I have no idea. I'll add it back this week.

This comment has been minimized.

@parkr

parkr Feb 25, 2013

Member

🍶

@mattr-

This comment has been minimized.

Member

mattr- commented Feb 25, 2013

Should be good now.

parkr added a commit that referenced this pull request Feb 26, 2013

Merge pull request #654 from mattr-/issue-653
Look for plugins under the source directory. Fixes #653.

@parkr parkr merged commit 465e250 into jekyll:master Feb 26, 2013

1 check passed

default The Travis build passed
Details

parkr added a commit that referenced this pull request Feb 26, 2013

@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.