aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:52:12 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-23 21:52:12 +0000
commit72e8ace28d921bb533a617c4b4078d0fb532fe98 (patch)
treef2374d72840f8ac768de90e0c1d372cdcd12d978 /ikiwiki
parentca0be85c59002ae9d01140cba587ffe909252471 (diff)
downloadikiwiki-72e8ace28d921bb533a617c4b4078d0fb532fe98.tar
ikiwiki-72e8ace28d921bb533a617c4b4078d0fb532fe98.tar.gz
Add file cretion times to the index file.
(Note that it's not really the file creation time, just the first time ikiwiki saw it.)
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki5
1 files changed, 4 insertions, 1 deletions
diff --git a/ikiwiki b/ikiwiki
index 4c815dfa3..9001c5e2a 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -8,7 +8,8 @@ use File::Spec;
use HTML::Template;
use lib '.'; # For use without installation, removed by Makefile.
-use vars qw{%config %links %oldlinks %oldpagemtime %renderedfiles %pagesources};
+use vars qw{%config %links %oldlinks %oldpagemtime %pagectime
+ %renderedfiles %pagesources};
sub usage () { #{{{
die "usage: ikiwiki [options] source dest\n";
@@ -326,6 +327,7 @@ sub loadindex () { #{{{
my $page=pagename($items{src}[0]);
$pagesources{$page}=$items{src}[0];
$oldpagemtime{$page}=$items{mtime}[0];
+ $pagectime{$page}=$items{ctime}[0];
$oldlinks{$page}=[@{$items{link}}];
$links{$page}=[@{$items{link}}];
$renderedfiles{$page}=$items{dest}[0];
@@ -341,6 +343,7 @@ sub saveindex () { #{{{
error("cannot write to $config{wikistatedir}/index: $!");
foreach my $page (keys %oldpagemtime) {
my $line="mtime=$oldpagemtime{$page} ".
+ "ctime=$pagectime{$page} ".
"src=$pagesources{$page} ".
"dest=$renderedfiles{$page}";
if ($oldpagemtime{$page}) {