]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
* The toc directive doesn't work well or make sense inside an inlined page.
[ikiwiki.git] / IkiWiki.pm
index e5d1c5c44e2d09c0ec1bd748df60f9665a23fd5b..0af4a4fe9303f292977294a8de5ec88d5ddf7d24 100644 (file)
@@ -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 "<a href=\"$bestlink\">$linktext</a>";
+       my @attrs;
+       if (defined $opts{rel}) {
+               push @attrs, ' rel="'.$opts{rel}.'"';
+       }
+
+       return "<a href=\"$bestlink\"@attrs>$linktext</a>";
 } #}}}
 
 sub htmlize ($$$) { #{{{