X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a..1b6b1ee2d8f2e148bca301b177713ca35d2b8691:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4a22fed30..c675880b3 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') { @@ -163,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}}, 'new("$re matches $field of $page"); + return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT); } else { return IkiWiki::FailReason->new("$re does not match $field of $page"); @@ -300,7 +305,7 @@ sub match { package IkiWiki::PageSpec; sub match_title ($$;@) { - IkiWiki::Plugin::meta::match("title", @_); + IkiWiki::Plugin::meta::match("title", @_); } sub match_author ($$;@) {