summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Render.pm1
-rw-r--r--doc/todo.mdwn1
-rwxr-xr-xikiwiki5
3 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 1ac85be44..b3dfc364d 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -292,6 +292,7 @@ sub refresh () { #{{{
push @add, $file;
$links{$page}=[];
$pagesources{$page}=$file;
+ $pagectime{$page}=time;
}
}
my @del;
diff --git a/doc/todo.mdwn b/doc/todo.mdwn
index 1ab3e749a..4ae62867e 100644
--- a/doc/todo.mdwn
+++ b/doc/todo.mdwn
@@ -88,7 +88,6 @@ Note that this allows for weblogs with different sections, etc.
Requirements:
-* Need to keep track of creation dates of pages in the index file.
* Need to keep track of the globlists in the index file.
* Need to pick a good token and note that the token will need to be passed
multiple parameters. Possibly something like this:
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}) {