From: Joey Hess Date: Mon, 28 Mar 2011 17:09:14 +0000 (-0400) Subject: Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info X-Git-Tag: 3.20110430~131 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/116672d7d72d8181607f69ad22ad8bd0bb9d8348?hp=144540f546892d6fd949cdbb8fe990c6f4781085 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info --- diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 1a9f94a12..eebe3460f 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -179,6 +179,17 @@ sub preprocess (@) { '" title="'.encode_entities($title). "\" type=\"text/css\" />", $page, $destpage); } + elsif ($key eq 'script') { + my $defer=exists $params{defer} ? ' defer="defer"' : ''; + my $async=exists $params{async} ? ' async="async"' : ''; + my $js=bestlink($page, $value.".js"); + if (! length $js) { + error gettext("script not found"); + } + push @{$metaheaders{$page}}, scrub('