More detailed pull request.
[ikiwiki] / doc / bugs / po:_plugin_should_not_override_the_title_on_the_homepage.mdwn
1 The po plugin systematically overrides the title of the homepage with the wikiname. This prevents explicitly changing it with a meta directive. It should rather check whether it was overridden before setting it back.
2
3 Here is a simple patch for that:
4
5     diff --git a/Plugin/po.pm b/Plugin/po.pm
6     index 6395ebd..a048c6a 100644
7     --- a/Plugin/po.pm
8     +++ b/Plugin/po.pm
9     @@ -333,7 +333,7 @@ sub pagetemplate (@) {
10                 && $masterpage eq "index") {
11                     $template->param('parentlinks' => []);
12             }
13     -       if (ishomepage($page) && $template->query(name => "title")) {
14     +       if (ishomepage($page) && $template->query(name => "title") && !$template->query(name => "title_overridden")) {
15                     $template->param(title => $config{wikiname});
16             }
17      }
18
19 Thanks.
20
21 > I fixed this patch and applied in my po branch, thanks.
22 > (This is commit 406485917, please pull.) --[[intrigeri]]