X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/91e416b5f3c54aed844be4291f04e13e678c02bf..bbfe1b9058f3e2b73d6c8c1f7eed80d72727d2a4:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 0890830a7..5bcd65837 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,12 +13,9 @@ my %author; my %authorurl; sub import { #{{{ - IkiWiki::hook(type => "preprocess", id => "meta", - call => \&preprocess); - IkiWiki::hook(type => "filter", id => "meta", - call => \&filter); - IkiWiki::hook(type => "pagetemplate", id => "meta", - call => \&pagetemplate); + hook(type => "preprocess", id => "meta", call => \&preprocess); + hook(type => "filter", id => "meta", call => \&filter); + hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); } # }}} sub filter (@) { #{{{ @@ -54,7 +51,7 @@ sub preprocess (@) { #{{{ } else { # hidden WikiLink - push @{$IkiWiki::links{$page}}, $value; + push @{$links{$page}}, $value; } } elsif ($key eq 'title') { @@ -85,8 +82,10 @@ sub pagetemplate (@) { #{{{ $template->param(meta => $meta{$page}) if exists $meta{$page} && $template->query(name => "meta"); - $template->param(title => $title{$page}) - if exists $title{$page} && $template->query(name => "title"); + if (exists $title{$page} && $template->query(name => "title")) { + $template->param(title => $title{$page}); + $template->param(title_overridden => 1); + } $template->param(permalink => $permalink{$page}) if exists $permalink{$page} && $template->query(name => "permalink"); $template->param(author => $author{$page})