X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ffec6806087981420eaf83c8d83cc4523a46d0de..acb79b5c00b48c4b52a29703e9d7b52330fd23b2:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 15bb29b3f..b2295923e 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -110,7 +110,7 @@ sub preprocess (@) { } elsif ($key eq 'link' && ! %params) { # hidden WikiLink - push @{$links{$page}}, $value; + add_link($page, $value); return ""; } elsif ($key eq 'author') { @@ -128,6 +128,13 @@ sub preprocess (@) { $IkiWiki::pagectime{$page}=$time if defined $time; } } + elsif ($key eq 'updated') { + eval q{use Date::Parse}; + if (! $@) { + my $time = str2time($value); + $pagestate{$page}{meta}{updated}=$time if defined $time; + } + } if (! defined wantarray) { # avoid collecting duplicate data during scan pass @@ -156,17 +163,22 @@ sub preprocess (@) { "\" type=\"text/css\" />"; } elsif ($key eq 'openid') { + my $delegate=0; # both by default + if (exists $params{delegate}) { + $delegate = 1 if lc $params{delegate} eq 'openid'; + $delegate = 2 if lc $params{delegate} eq 'openid2'; + } if (exists $params{server} && safeurl($params{server})) { push @{$metaheaders{$page}}, ''; + '" rel="openid.server" />' if $delegate ne 2; push @{$metaheaders{$page}}, ''; + '" rel="openid2.provider" />' if $delegate ne 1; } if (safeurl($value)) { push @{$metaheaders{$page}}, ''; + '" rel="openid.delegate" />' if $delegate ne 2; push @{$metaheaders{$page}}, ''; + '" rel="openid2.local_id" />' if $delegate ne 1; } if (exists $params{"xrds-location"} && safeurl($params{"xrds-location"})) { push @{$metaheaders{$page}}, '