]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
add --refresh and make it with with --setup
[ikiwiki.git] / IkiWiki / Render.pm
index 3fdbc6f4a3dd87f5094f71a70f009deb154f9188..dc1fc54e7a56770a18dfae04354c77619a573ad2 100644 (file)
@@ -160,12 +160,22 @@ sub postprocess_html_inline { #{{{
        }
        $inlinepages{$parentpage}=$params{pages};
        
        }
        $inlinepages{$parentpage}=$params{pages};
        
+       my $ret="";
+       
+       if (exists $params{rootpage}) {
+               my $formtemplate=HTML::Template->new(blind_cache => 1,
+                       filename => "$config{templatedir}/blogpost.tmpl");
+               $formtemplate->param(cgiurl => $config{cgiurl});
+               $formtemplate->param(rootpage => $params{rootpage});
+               my $form=$formtemplate->output;
+               $ret.=$form;
+       }
+       
        my $template=HTML::Template->new(blind_cache => 1,
                filename => (($params{archive} eq "no") 
                                ? "$config{templatedir}/inlinepage.tmpl"
                                : "$config{templatedir}/inlinepagetitle.tmpl"));
        
        my $template=HTML::Template->new(blind_cache => 1,
                filename => (($params{archive} eq "no") 
                                ? "$config{templatedir}/inlinepage.tmpl"
                                : "$config{templatedir}/inlinepagetitle.tmpl"));
        
-       my $ret="";
        foreach my $page (blog_list($params{pages}, $params{show})) {
                next if $page eq $parentpage;
                $template->param(pagelink => htmllink($parentpage, $page));
        foreach my $page (blog_list($params{pages}, $params{show})) {
                next if $page eq $parentpage;
                $template->param(pagelink => htmllink($parentpage, $page));
@@ -205,7 +215,7 @@ sub genpage ($$$) { #{{{
        }
 
        if ($config{rss} && $inlinepages{$page}) {
        }
 
        if ($config{rss} && $inlinepages{$page}) {
-               $template->param(rssurl => rsspage($page));
+               $template->param(rssurl => rsspage(basename($page)));
        }
        
        $template->param(
        }
        
        $template->param(
@@ -305,9 +315,9 @@ sub check_overwrite ($$) { #{{{
 } #}}}
 
 sub mtime ($) { #{{{
 } #}}}
 
 sub mtime ($) { #{{{
-       my $page=shift;
+       my $file=shift;
        
        
-       return (stat($page))[9];
+       return (stat($file))[9];
 } #}}}
 
 sub findlinks ($$) { #{{{
 } #}}}
 
 sub findlinks ($$) { #{{{
@@ -408,7 +418,8 @@ sub refresh () { #{{{
                        push @add, $file;
                        $links{$page}=[];
                        $pagesources{$page}=$file;
                        push @add, $file;
                        $links{$page}=[];
                        $pagesources{$page}=$file;
-                       $pagectime{$page}=time unless exists $pagectime{$page};
+                       $pagectime{$page}=mtime("$config{srcdir}/$file") 
+                               unless exists $pagectime{$page};
                }
        }
        my @del;
                }
        }
        my @del;