X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ea734d451ce7680906618b41ac35a0f3904b154a..7e7dea078bce3437b9a14d96079ddd68a5f0aab9:/IkiWiki/Plugin/meta.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index ad6d1a8e3..eebe3460f 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -174,10 +174,21 @@ sub preprocess (@) { if (! length $stylesheet) { error gettext("stylesheet not found") } - push @{$metaheaders{$page}}, '"; + "\" 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('