From dd9d117894952efb23c8b444ae27672571d6548a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 25 Jul 2010 20:18:02 -0400 Subject: meta: Allow syntax closer to html meta to be used. The idea here is that can be written like [[!meta name="foo" description="bar">. Of course, [[!meta foo=bar]] is still supported; this new feature provides some DWIM when trying to directly convert a meta tag into a meta directive. --- IkiWiki/Plugin/meta.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 7d68a9b2d..d18585d3d 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -253,12 +253,20 @@ sub preprocess (@) { ' content="'.encode_entities($value).'" />'; } elsif ($key eq 'description') { - push @{$metaheaders{$page}}, ''; } + elsif ($key eq 'name') { + push @{$metaheaders{$page}}, scrub('', $destpage); + } else { - push @{$metaheaders{$page}}, scrub('', $destpage); + push @{$metaheaders{$page}}, scrub('', $destpage); } return ""; -- cgit v1.2.3