X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/cdf4292846e6fe0fb877809ef0906ff6bddf6bf9..9ea48dd49bc37bca9c7efe9a35541360b67a51aa:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 27fa4ca17..701f7137d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -441,6 +441,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + wrapper_background_command => { + type => "internal", + default => '', + description => "background shell command to run", + safe => 0, + rebuild => 0, + }, gettime => { type => "internal", description => "running in gettime mode", @@ -592,10 +599,11 @@ sub loadplugins () { return 1; } -sub loadplugin ($) { +sub loadplugin ($;$) { my $plugin=shift; + my $force=shift; - return if grep { $_ eq $plugin} @{$config{disable_plugins}}; + return if ! $force && grep { $_ eq $plugin} @{$config{disable_plugins}}; foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef, "$installdir/lib/ikiwiki") { @@ -1739,11 +1747,20 @@ sub template ($;@) { sub misctemplate ($$;@) { my $title=shift; my $content=shift; + my %params=@_; my $template=template("page.tmpl"); + my $page=""; + if (exists $params{page}) { + $page=delete $params{page}; + } run_hooks(pagetemplate => sub { - shift->(page => "", destpage => "", template => $template); + shift->( + page => $page, + destpage => $page, + template => $template, + ); }); templateactions($template, ""); @@ -1754,7 +1771,7 @@ sub misctemplate ($$;@) { content => $content, baseurl => baseurl(), html5 => $config{html5}, - @_, + %params, ); return $template->output; @@ -1830,11 +1847,11 @@ sub rcs_prepedit ($) { $hooks{rcs}{rcs_prepedit}{call}->(@_); } -sub rcs_commit ($$$;$$) { +sub rcs_commit (@) { $hooks{rcs}{rcs_commit}{call}->(@_); } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged (@) { $hooks{rcs}{rcs_commit_staged}{call}->(@_); }