X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/194824ce293a64f7dce68d568d1f906d675af858..50c9851ddc834f6261da0df525374efd867f731d:/IkiWiki/Render.pm?ds=sidebyside diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 7e3d78861..8b1b9aef4 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -62,8 +62,8 @@ sub genpage ($$) { my $page=shift; my $content=shift; - run_hooks(postscan => sub { - shift->(page => $page, content => $content); + run_hooks(indexhtml => sub { + shift->(page => $page, destpage => $page, content => $content); }); my $templatefile; @@ -112,7 +112,14 @@ sub genpage ($$) { } } - if ($actions) { + my @actions; + run_hooks(pageactions => sub { + push @actions, map { { action => $_ } } + grep { defined } shift->(page => $page); + }); + $template->param(actions => \@actions); + + if ($actions || @actions) { $template->param(have_actions => 1); } @@ -136,8 +143,9 @@ sub genpage ($$) { backlinks => $backlinks, more_backlinks => $more_backlinks, mtime => displaytime($pagemtime{$page}), - ctime => displaytime($pagectime{$page}), + ctime => displaytime($pagectime{$page}, undef, 1), baseurl => baseurl($page), + html5 => $config{html5}, ); run_hooks(pagetemplate => sub { @@ -313,6 +321,7 @@ sub find_src_files () { my ($f) = $file =~ /$config{wiki_file_regexp}/; # untaint if (! defined $f) { warn(sprintf(gettext("skipping bad filename %s"), $file)."\n"); + return; } if ($underlay) { @@ -632,7 +641,7 @@ sub render_dependent ($$$$$$$) { # only consider internal files # if the page explicitly depends # on such files - my $internal_dep=$dep =~ /internal\(/; + my $internal_dep=$dep =~ /(?:internal|comment|comment_pending)\(/; my $in=sub { my $list=shift; @@ -791,8 +800,8 @@ sub refresh () { render_backlinks($backlinkchanged); remove_unrendered(); - if (@$del) { - run_hooks(delete => sub { shift->(@$del) }); + if (@$del || @$internal_del) { + run_hooks(delete => sub { shift->(@$del, @$internal_del) }); } if (%rendered) { run_hooks(change => sub { shift->(keys %rendered) });