File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
lib/jekyll/algolia/overwrites Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,23 @@ module GitHubPages
10
10
# github-pages gem installed at the same time, those hooks will never be
11
11
# executed.
12
12
#
13
- # Here, we overwrite the call to GitHubPages::Configuration.set that init the
14
- # whole plugin to actually do nothing, hence disabling the plugin completely.
15
- # https://github.com/github/pages-gem/blob/master/lib/github-pages.rb#L19
13
+ # The GitHub Pages gem prevent access to custom plugins by doing two things:
14
+ # - forcing safe mode
15
+ # - loading custom plugins from a random dir
16
+ #
17
+ # We cancel those by disabling safe mode and forcing back plugins to be read
18
+ # from ./_plugins.
16
19
#
17
20
# This file will only be loaded when running `jekyll algolia`, so it won't
18
21
# interfere with the regular usage of `jekyll build`
19
22
class Configuration
20
23
class << self
21
- def set ( site ) ; end
24
+ def set! ( site )
25
+ config = effective_config ( site . config )
26
+ config [ 'safe' ] = false
27
+ config [ 'plugins_dir' ] = '_plugins'
28
+ site . config = config
29
+ end
22
30
end
23
31
end
24
32
end
You can’t perform that action at this time.
0 commit comments