diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-21 16:42:25 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-21 16:42:25 -0400 |
commit | b9071082717cd7fd56e66963b47a6d589848e062 (patch) | |
tree | bba6504403d5dd8aa80be186934f5369d5f18f2e /IkiWiki | |
parent | 7ae0f754f3d82273948f8c5f1426fda91420aeb1 (diff) | |
download | ikiwiki-b9071082717cd7fd56e66963b47a6d589848e062.tar ikiwiki-b9071082717cd7fd56e66963b47a6d589848e062.tar.gz |
meta: Gather permalink info on scan pass so it is available to inline when using a template that does not include page content.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 8dcd73a1a..6fe9cda34 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -121,6 +121,10 @@ sub preprocess (@) { $pagestate{$page}{meta}{authorurl}=$value if safeurl($value); # fallthrough } + elsif ($key eq 'permalink') { + $pagestate{$page}{meta}{permalink}=$value if safeurl($value); + # fallthrough + } elsif ($key eq 'date') { eval q{use Date::Parse}; if (! $@) { @@ -141,10 +145,9 @@ sub preprocess (@) { return; } - # Metadata collection that happens only during preprocessing pass. + # Metadata handling that happens only during preprocessing pass. if ($key eq 'permalink') { if (safeurl($value)) { - $pagestate{$page}{meta}{permalink}=$value; push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage); } } |