summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/po.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r--IkiWiki/Plugin/po.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 42a125808..739564c6b 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -285,6 +285,9 @@ sub pagetemplate (@) { #{{{
if ($template->query(name => "istranslatable")) {
$template->param(istranslatable => istranslatable($page));
}
+ if ($template->query(name => "HOMEPAGEURL")) {
+ $template->param(homepageurl => homepageurl($page));
+ }
if ($template->query(name => "otherlanguages")) {
$template->param(otherlanguages => [otherlanguagesloop($page)]);
map add_depends($page, $_), (values %{otherlanguages($page)});
@@ -705,6 +708,11 @@ sub otherlanguagesloop ($) { #{{{
} @ret;
} #}}}
+sub homepageurl (;$) { #{{{
+ my $page=shift;
+
+ return urlto('', $page);
+} #}}}
# ,----
# | PageSpec's