summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-21 22:27:02 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-21 22:27:02 +0000
commitcf3021ef3f5cb839195585d601de76df519da510 (patch)
treee239dbfdec8b90f9aa7654b5bd0ce10cdb542611 /IkiWiki.pm
parent0dc0d8e3b5f2db006ac83d0d7f336c2fda51b4bb (diff)
* Fixed a bug with previews of subpages having broken links to top-level
pages. * Change how the stylesheet url is determined in the templates: Remove STYLEURL and add BASEURL to all templates (some already had it). This new more general variable can be used to link to other things (eg, images) from the template, as well as stylesheets.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 4e3011918..9556d6ef7 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -304,14 +304,14 @@ sub cgiurl (@) { #{{{
return $config{cgiurl}."?".join("&amp;", map "$_=$params{$_}", keys %params);
} #}}}
-sub styleurl (;$) { #{{{
+sub baseurl (;$) { #{{{
my $page=shift;
- return "$config{url}/style.css" if ! defined $page;
+ return "$config{url}/" if ! defined $page;
$page=~s/[^\/]+$//;
$page=~s/[^\/]+\//..\//g;
- return $page."style.css";
+ return $page;
} #}}}
sub abs2rel ($$) { #{{{
@@ -476,8 +476,7 @@ sub misctemplate ($$) { #{{{
indexlink => indexlink(),
wikiname => $config{wikiname},
pagebody => $pagebody,
- styleurl => styleurl(),
- baseurl => "$config{url}/",
+ baseurl => baseurl(),
);
return $template->output;
}#}}}