X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1612dce6bbb050eacf6843b972ffaf9816d724be..b72780e70b54bef4fd7fa52a3d2f221b9b4a46d4:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index e5d1c5c44..0af4a4fe9 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" @@ -541,7 +546,12 @@ sub htmllink ($$$;@) { #{{{ $bestlink.="#".$opts{anchor}; } - return "$linktext"; + my @attrs; + if (defined $opts{rel}) { + push @attrs, ' rel="'.$opts{rel}.'"'; + } + + return "$linktext"; } #}}} sub htmlize ($$$) { #{{{