]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
* Fixed a bug with previews of subpages having broken links to top-level
[ikiwiki.git] / IkiWiki / Render.pm
index 7cb55f12873c4e76ccaccf25e20953587346bd5f..ddd14692230a749b0cee57b6396279e4f236e9bd 100644 (file)
@@ -74,7 +74,7 @@ sub parentlinks ($) { #{{{
        foreach my $dir (reverse split("/", $page)) {
                if (! $skip) {
                        $path.="../";
-                       unshift @ret, { url => "$path$dir.html", page => pagetitle($dir) };
+                       unshift @ret, { url => $path.htmlpage($dir), page => pagetitle($dir) };
                }
                else {
                        $skip=0;
@@ -180,14 +180,20 @@ sub genpage ($$$) { #{{{
                content => $content,
                backlinks => [backlinks($page)],
                mtime => displaytime($mtime),
-               styleurl => styleurl($page),
+               baseurl => baseurl($page),
        );
 
        run_hooks(pagetemplate => sub {
                shift->(page => $page, destpage => $page, template => $template);
        });
        
-       return $template->output;
+       $content=$template->output;
+
+       run_hooks(format => sub {
+               $content=shift->($content);
+       });
+
+       return $content;
 } #}}}
 
 sub check_overwrite ($$) { #{{{
@@ -352,6 +358,7 @@ sub refresh () { #{{{
                        debug("new page $page") unless exists $pagectime{$page};
                        push @add, $file;
                        $links{$page}=[];
+                       $pagecase{lc $page}=$page;
                        $pagesources{$page}=$file;
                        if ($config{getctime} && -e "$config{srcdir}/$file") {
                                $pagectime{$page}=rcs_getctime("$config{srcdir}/$file");