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 +++++++++++--- debian/changelog | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) 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 -- cgit v1.2.3