aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index d5a641526..7c35ce2b5 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -160,11 +160,20 @@ sub loadplugin ($) { #{{{
return if grep { $_ eq $plugin} @{$config{disable_plugins}};
+ foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") {
+ if (defined $dir && -x "$dir/plugins/$plugin") {
+ require IkiWiki::Plugin::external;
+ import IkiWiki::Plugin::external "$dir/plugins/$plugin";
+ return 1;
+ }
+ }
+
my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin);
eval qq{use $mod};
if ($@) {
error("Failed to load plugin $mod: $@");
}
+ return 1;
} #}}}
sub error ($;$) { #{{{