X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/13e3bf867157226076fcc14a0d3875fd129a66c7..819a31ed24cfb95da7e37a7524ecf0655e106903:/ikiwiki diff --git a/ikiwiki b/ikiwiki index 3cf2a7cb3..dfb484f64 100755 --- a/ikiwiki +++ b/ikiwiki @@ -9,7 +9,7 @@ use HTML::Template; use lib '.'; # For use without installation, removed by Makefile. use vars qw{%config %links %oldlinks %oldpagemtime %pagectime - %renderedfiles %pagesources %inlinepages}; + %renderedfiles %pagesources %depends}; sub usage () { #{{{ die "usage: ikiwiki [options] source dest\n"; @@ -34,6 +34,7 @@ sub getconfig () { #{{{ diffurl => '', anonok => 0, rss => 0, + sanitize => 1, rebuild => 0, refresh => 0, getctime => 0, @@ -66,6 +67,7 @@ sub getconfig () { #{{{ "rss!" => \$config{rss}, "cgi!" => \$config{cgi}, "notify!" => \$config{notify}, + "sanitize!" => \$config{sanitize}, "url=s" => \$config{url}, "cgiurl=s" => \$config{cgiurl}, "historyurl=s" => \$config{historyurl}, @@ -156,14 +158,14 @@ sub debug ($) { #{{{ sub basename ($) { #{{{ my $file=shift; - $file=~s!.*/!!; + $file=~s!.*/+!!; return $file; } #}}} sub dirname ($) { #{{{ my $file=shift; - $file=~s!/?[^/]+$!!; + $file=~s!/*[^/]+$!!; return $file; } #}}} @@ -397,8 +399,8 @@ sub loadindex () { #{{{ $oldpagemtime{$page}=$items{mtime}[0]; $oldlinks{$page}=[@{$items{link}}]; $links{$page}=[@{$items{link}}]; - $inlinepages{$page}=join(" ", @{$items{inlinepage}}) - if exists $items{inlinepage}; + $depends{$page}=join(" ", @{$items{depends}}) + if exists $items{depends}; $renderedfiles{$page}=$items{dest}[0]; } $pagectime{$page}=$items{ctime}[0]; @@ -419,8 +421,8 @@ sub saveindex () { #{{{ "src=$pagesources{$page} ". "dest=$renderedfiles{$page}"; $line.=" link=$_" foreach @{$links{$page}}; - if (exists $inlinepages{$page}) { - $line.=" inlinepage=$_" foreach split " ", $inlinepages{$page}; + if (exists $depends{$page}) { + $line.=" depends=$_" foreach split " ", $depends{$page}; } print OUT $line."\n"; } @@ -497,9 +499,9 @@ sub main () { #{{{ loadindex(); require IkiWiki::Render; rcs_update(); - rcs_notify() if $config{notify}; rcs_getctime() if $config{getctime}; refresh(); + rcs_notify() if $config{notify}; saveindex(); } } #}}}