aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2013-02-18 16:24:22 -0500
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2013-02-19 20:22:46 -0500
commit546da9bac7135d7d1b02dce0c0eef2209d939fc6 (patch)
tree4c737a7fa89f9110a060153f7eaf0a1b7babb4f9 /IkiWiki/Plugin
parent86df150fb0d9d0890b14fef545a772379a2f56af (diff)
downloadikiwiki-546da9bac7135d7d1b02dce0c0eef2209d939fc6.tar
ikiwiki-546da9bac7135d7d1b02dce0c0eef2209d939fc6.tar.gz
Make [[!meta enclosure=foo.mp3]] "work" for HTML.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/meta.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 421f1dc86..cb0768b91 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -121,6 +121,9 @@ sub preprocess (@) {
add_link($page, $value);
return "";
}
+ elsif ($key eq 'enclosure') {
+ $pagestate{$page}{meta}{enclosure}=$value;
+ }
elsif ($key eq 'author') {
$pagestate{$page}{meta}{author}=$value;
if (exists $params{sortas}) {
@@ -318,6 +321,11 @@ sub pagetemplate (@) {
$template->param(title_overridden => 1);
}
+ if (exists $pagestate{$page}{meta}{enclosure}) {
+ # XXX what if the enclosure doesn't exist?
+ $template->param(enclosure => $pagestate{$page}{meta}{enclosure});
+ }
+
foreach my $field (qw{authorurl}) {
eval q{use HTML::Entities};
$template->param($field => HTML::Entities::encode_entities($pagestate{$page}{meta}{$field}))