Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
template.pm
diff --git
a/IkiWiki/Plugin/template.pm
b/IkiWiki/Plugin/template.pm
index c33dbbb83b8d1623ffd1348667247ec3be04f082..c980df48f4a48dfa8100fefa341740a2028244eb 100644
(file)
--- a/
IkiWiki/Plugin/template.pm
+++ b/
IkiWiki/Plugin/template.pm
@@
-9,9
+9,18
@@
use HTML::Template;
use Encode;
sub import { #{{{
use Encode;
sub import { #{{{
+ hook(type => "getsetup", id => "template", call => \&getsetup);
hook(type => "preprocess", id => "template", call => \&preprocess);
} # }}}
hook(type => "preprocess", id => "template", call => \&preprocess);
} # }}}
+sub getsetup () { #{{{
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+} #}}}
+
sub preprocess (@) { #{{{
my %params=@_;
sub preprocess (@) { #{{{
my %params=@_;
@@
-24,7
+33,7
@@
sub preprocess (@) { #{{{
my $template_file=$pagesources{$template_page};
return sprintf(gettext("template %s not found"),
my $template_file=$pagesources{$template_page};
return sprintf(gettext("template %s not found"),
- htmllink($params{page}, $params{destpage}, $template_page))
+ htmllink($params{page}, $params{destpage},
"/".
$template_page))
unless defined $template_file;
my $template;
unless defined $template_file;
my $template;