aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/teximg.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/teximg.pm
parentbe0f1a63a3ebd05967a8bc6b03a425a2118b17c4 (diff)
downloadikiwiki-f7bdc2385d3ec8060f00d5ceb3b45f3cc4760e38.tar
ikiwiki-f7bdc2385d3ec8060f00d5ceb3b45f3cc4760e38.tar.gz
* 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/teximg.pm')
-rw-r--r--IkiWiki/Plugin/teximg.pm16
1 files changed, 4 insertions, 12 deletions
diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm
index 5dff5feef..f7fd91ddf 100644
--- a/IkiWiki/Plugin/teximg.pm
+++ b/IkiWiki/Plugin/teximg.pm
@@ -70,21 +70,13 @@ sub create ($$$) { #{{{
my $digest = md5_hex($code, $height);
- my $imglink= $params->{page} . "/$digest.png";
- my $imglog = $params->{page} . "/$digest.log";
+ my $imglink= $params->{destpage} . "/$digest.png";
+ my $imglog = $params->{destpage} . "/$digest.log";
will_render($params->{destpage}, $imglink);
will_render($params->{destpage}, $imglog);
- my $imgurl;
- my $logurl;
- if (! $params->{preview}) {
- $imgurl = urlto($imglink, $params->{destpage});
- $logurl = urlto($imglog, $params->{destpage});
- }
- else {
- $imgurl=$params->{page}."/$digest.png";
- $logurl=$params->{page}."/$digest.log";
- }
+ my $imgurl=urlto($imglink, $params->{destpage});
+ my $logurl=urlto($imglink, $params->{destpage});
if (-e "$config{destdir}/$imglink" ||
gen_image($code, $height, $digest, $params->{page})) {