aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2013-06-27 00:21:20 -0400
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2013-06-27 00:21:20 -0400
commitb25f7700bde4981d1fb69d89c1451abc0c7bb87a (patch)
tree3fe46678108c354f9d01f433fa60be69116cbb85 /IkiWiki
parente0ff81b48db087cc36e07a97db33e6af9411f64e (diff)
downloadikiwiki-b25f7700bde4981d1fb69d89c1451abc0c7bb87a.tar
ikiwiki-b25f7700bde4981d1fb69d89c1451abc0c7bb87a.tar.gz
Instead of hacking back to $link, just provide it.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/inline.pm6
-rw-r--r--IkiWiki/Plugin/meta.pm1
2 files changed, 2 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index e313eb775..455ac3ad5 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -672,11 +672,7 @@ sub genfeed ($$$$$@) {
if (exists $pagestate{$p}{meta}{enclosure}) {
my $absurl = $pagestate{$p}{meta}{enclosure};
-
- # XXX better way to compute relative to srcdir?
- my $file = $absurl;
- $file =~ s|^$config{url}/||;
-
+ my $file = $pagestate{$p}{meta}{enclosurefile};
genenclosure($itemtemplate, $absurl, $file);
$fancy_enclosure_seen = 1;
}
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 794f6d861..e7b96bdf1 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -130,6 +130,7 @@ sub preprocess (@) {
$value=urlto($link, $page, 1);
$pagestate{$page}{meta}{enclosure}=$value;
+ $pagestate{$page}{meta}{enclosurefile}=$link;
# fallthrough
}
elsif ($key eq 'author') {