summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-20 19:56:37 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-20 19:56:37 +0000
commitb7c86dda2f900dc991d1f6becda56ba3300cccce (patch)
treeaf7c88591f4672afce87bc287ad2d09ca9139c46 /ikiwiki
parent3a6d0d3a771cbbc1f252cb3cfcdbeabf36d38f2b (diff)
added last changed timestamp for pages
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki7
1 files changed, 5 insertions, 2 deletions
diff --git a/ikiwiki b/ikiwiki
index d1a31eb55..167b9d43a 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -324,9 +324,10 @@ sub indexlink () { #{{{
return "<a href=\"$config{url}\">$config{wikiname}</a>";
} #}}}
-sub finalize ($$) { #{{{
+sub finalize ($$$) { #{{{
my $content=shift;
my $page=shift;
+ my $mtime=shift;
my $title=basename($page);
$title=~s/_/ /g;
@@ -354,6 +355,7 @@ sub finalize ($$) { #{{{
content => $content,
backlinks => [backlinks($page)],
discussionlink => htmllink($page, "Discussion", 1, 1),
+ mtime => scalar(gmtime($mtime)),
);
return $template->output;
@@ -385,7 +387,8 @@ sub render ($) { #{{{
$content=linkify($content, $page);
$content=htmlize($type, $content);
- $content=finalize($content, $page);
+ $content=finalize($content, $page,
+ mtime("$config{srcdir}/$file"));
check_overwrite("$config{destdir}/".htmlpage($page), $page);
writefile("$config{destdir}/".htmlpage($page), $content);