summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/img.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-03-12 14:21:48 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-03-12 14:21:48 -0400
commitf7bdc2385d3ec8060f00d5ceb3b45f3cc4760e38 (patch)
tree852afeedb432084b4832263087a706a4e7bde408 /IkiWiki/Plugin/img.pm
parentbe0f1a63a3ebd05967a8bc6b03a425a2118b17c4 (diff)
* Use forcebaseurl to make page previews be displayed with the html base
set to the destination page. This avoids need for hacks to munge the urls in preview mode, which fixes several bugs. * Several destpage fixes in plugins.
Diffstat (limited to 'IkiWiki/Plugin/img.pm')
-rw-r--r--IkiWiki/Plugin/img.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm
index b6e7c9e41..c5b86bad8 100644
--- a/IkiWiki/Plugin/img.pm
+++ b/IkiWiki/Plugin/img.pm
@@ -39,7 +39,7 @@ sub preprocess (@) { #{{{
my $file = bestlink($params{page}, $image);
- my $dir = $params{page};
+ my $dir = $params{destpage};
my $base = IkiWiki::basename($file);
eval q{use Image::Magick};
@@ -56,7 +56,7 @@ sub preprocess (@) { #{{{
my $outfile = "$config{destdir}/$dir/${w}x${h}-$base";
$imglink = "$dir/${w}x${h}-$base";
- will_render($params{page}, $imglink);
+ will_render($params{destpage}, $imglink);
if (-e $outfile && (-M srcfile($file) >= -M $outfile)) {
$r = $im->Read($outfile);