From: Joey Hess Date: Mon, 26 Jul 2010 00:18:02 +0000 (-0400) Subject: meta: Allow syntax closer to html meta to be used. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/dd9d117894952efb23c8b444ae27672571d6548a?ds=sidebyside 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. --- 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 ""; diff --git a/debian/changelog b/debian/changelog index b6a783787..167d02c6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ikiwiki (3.20100723) UNRELEASED; urgency=low translated languages can be controlled. (intrigeri) * git: Fix gitweb historyurl examples so "diff to current" links work. (Thanks jrayhawk) + * meta: Allow syntax closer to html meta to be used. -- Joey Hess Fri, 23 Jul 2010 14:00:32 -0400