Skip to content

Loading…

Document/standardize using plugins as gems or .rb files #1417

Closed
robwierzbowski opened this Issue · 7 comments

4 participants

@robwierzbowski

Some of the plugins I use are the documented .rb files (drop them into your plugin folder), while others are gems that require a more complicated setup procedure.

I think it would be worth documenting setup for both, and possibly the benefits of either approach. Is there an official preference on plugins as gems or .rb files?

@mattr-
Jekyll member

There's not an existing standard. It's really up to how the plugin developer decides to package it.

@robwierzbowski

Thanks @mattr-. I'll give a shot at adding a brief gem section to the plugins page when I get some spare time.

@parkr
Jekyll member

What do you think about adding a field in _config.yml (array) that would contain a list of gem names to be required on start-up? Obviously only in unsafe mode.

@robwierzbowski

That's a great idea. Dropping plugins into the plugin folder encourages inlining dependencies, but is easy to use; the "_plugins/ext.rb" pattern is confusing to me, and only gets worse when you mix and match. Something like

  1. Add gems to your gemfile
  2. Install gems
  3. Require gems in _config.yml

is way better, and easy enough that it could be the default recommendation.

I like that this would let you switch which gems you're requiring by switching/cascading config files.

@parkr
Jekyll member

That is a great workflow! We have to support both at least for a while but this would be a cool feature for 1.3. @mattr- @benbalter let me know if you think that'd be a good idea.

@benbalter

:+1: (sans safe mode)

@parkr parkr referenced this issue
Merged

Add `gems` for better plugin management #1557

2 of 3 tasks complete
@parkr
Jekyll member

We now have gemified plugins! If you have time to write a quick tutorial (or screencast!), we'd be happy to publish it.

@parkr parkr closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.