aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-07-27 00:48:06 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-07-27 00:48:06 +0000
commit1e5cd11635ef45e8223f56b952c8636d993e5908 (patch)
tree7c2b2a3dc1e36e82b5fb7af47118b00396bb6910 /IkiWiki.pm
parentb4fa92f9e74d48281f285b4a682ec41e24e686db (diff)
downloadikiwiki-1e5cd11635ef45e8223f56b952c8636d993e5908.tar
ikiwiki-1e5cd11635ef45e8223f56b952c8636d993e5908.tar.gz
* Add a libdir config option to let ikiwiki load perl modules, including
plugins, from a user-configurable directory.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e5d1c5c44..88dcdcb5b 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -86,6 +86,7 @@ sub defaultconfig () { #{{{
adminemail => undef,
plugin => [qw{mdwn inline htmlscrubber passwordauth openid signinedit
lockedit conditional}],
+ libdir => undef,
timeformat => '%c',
locale => undef,
sslcookie => 0,
@@ -140,8 +141,12 @@ sub checkconfig () { #{{{
} #}}}
sub loadplugins () { #{{{
+ if (defined $config{libdir}) {
+ unshift @INC, $config{libdir};
+ }
+
loadplugin($_) foreach @{$config{plugin}};
-
+
run_hooks(getopt => sub { shift->() });
if (grep /^-/, @ARGV) {
print STDERR "Unknown option: $_\n"