mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-31 01:38:24 -05:00
Require gems in :jekyll_plugins group in a Gemfile in unsafe mode.
Replaces #1658. /cc @imathis
This commit is contained in:
@@ -17,6 +17,7 @@ module Jekyll
|
||||
def conscientious_require
|
||||
require_plugin_files
|
||||
require_gems
|
||||
require_from_bundler
|
||||
end
|
||||
|
||||
# Require each of the gem plugins specified.
|
||||
@@ -30,6 +31,15 @@ module Jekyll
|
||||
end
|
||||
end
|
||||
|
||||
def require_from_bundler
|
||||
unless site.safe
|
||||
require "bundler/setup"
|
||||
Bundler.require(:jekyll_plugins)
|
||||
end
|
||||
rescue LoadError
|
||||
false
|
||||
end
|
||||
|
||||
# Check whether a gem plugin is allowed to be used during this build.
|
||||
#
|
||||
# gem_name - the name of the gem
|
||||
|
||||
Reference in New Issue
Block a user