},
default_plugins => {
type => "internal",
- default => [qw{mdwn link inline htmlscrubber passwordauth
+ default => [qw{mdwn link inline meta htmlscrubber passwordauth
openid signinedit lockedit conditional
recentchanges parentlinks editpage}],
description => "plugins to enable by default",
safe => 0,
rebuild => 0,
},
+ wikistatedir => {
+ type => "internal",
+ default => undef,
+ description => "path to the .ikiwiki directory holding ikiwiki state",
+ safe => 0,
+ rebuild => 0,
+ },
setupfile => {
type => "internal",
default => undef,
}
$config{wikistatedir}="$config{srcdir}/.ikiwiki"
- unless exists $config{wikistatedir};
+ unless exists $config{wikistatedir} && defined $config{wikistatedir};
if (defined $config{umask}) {
umask(possibly_foolish_untaint($config{umask}));
sub targetpage ($$) { #{{{
my $page=shift;
my $ext=shift;
-
- my $targetpage='';
- run_hooks(targetpage => sub {
- $targetpage=shift->(
- page => $page,
- ext => $ext,
- );
- });
-
- if (defined $targetpage && (length($targetpage) > 0)) {
- return $targetpage;
- }
- elsif (! $config{usedirs} || $page eq 'index') {
+
+ if (! $config{usedirs} || $page eq 'index') {
return $page.".".$ext;
}
else {
else {
return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
if match_glob($p, $link, %params);
+ $p=~s/^\///;
+ $link=~s/^\///;
+ return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
+ if match_glob($p, $link, %params);
}
}
return IkiWiki::FailReason->new("$page does not link to $link");