From cb8d1c86425999eb3572326679fae9a033664150 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Mar 2008 20:01:26 -0400 Subject: revert destpage part of f7bdc2385 destpage does not normally need to be worried about when creating other files as part of the process of rendering a page. Using destpage results in inlined pages creating two copies of such files. It works to not use destpage in this case because the inlining page depends on the source page, so if the source page is modified or deleted the inlining page will be updated. --- IkiWiki/Plugin/img.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/img.pm') diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index c5b86bad8..b6e7c9e41 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{destpage}; + my $dir = $params{page}; 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{destpage}, $imglink); + will_render($params{page}, $imglink); if (-e $outfile && (-M srcfile($file) >= -M $outfile)) { $r = $im->Read($outfile); -- cgit v1.2.3