Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
introduce portier here as well, while i'm here
[git.ikiwiki.info.git]
/
IkiWiki
/
Render.pm
diff --git
a/IkiWiki/Render.pm
b/IkiWiki/Render.pm
index 9d6f636a25c372019eb56075029e820e3d3113a5..e8ed627a40237021dd9ae38ff730077b8231c8f2 100644
(file)
--- a/
IkiWiki/Render.pm
+++ b/
IkiWiki/Render.pm
@@
-111,7
+111,7
@@
sub genpage ($$) {
}
templateactions($template, $page);
}
templateactions($template, $page);
- my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page);
+ my @backlinks=sort { $a->{page} cmp $b->{page}
|| $a->{url} cmp $b->{url}
} backlinks($page);
my ($backlinks, $more_backlinks);
if (@backlinks <= $config{numbacklinks} || ! $config{numbacklinks}) {
$backlinks=\@backlinks;
my ($backlinks, $more_backlinks);
if (@backlinks <= $config{numbacklinks} || ! $config{numbacklinks}) {
$backlinks=\@backlinks;
@@
-134,6
+134,7
@@
sub genpage ($$) {
ctime => displaytime($pagectime{$page}, undef, 1),
baseurl => baseurl($page),
html5 => $config{html5},
ctime => displaytime($pagectime{$page}, undef, 1),
baseurl => baseurl($page),
html5 => $config{html5},
+ responsive_layout => $config{responsive_layout},
);
run_hooks(pagetemplate => sub {
);
run_hooks(pagetemplate => sub {
@@
-154,7
+155,7
@@
sub genpage ($$) {
sub scan ($) {
my $file=shift;
sub scan ($) {
my $file=shift;
- return if
$phase > PHASE_SCAN
|| $scanned{$file};
+ return if
($config{rebuild} && $phase > PHASE_SCAN)
|| $scanned{$file};
$scanned{$file}=1;
debug(sprintf(gettext("scanning %s"), $file));
$scanned{$file}=1;
debug(sprintf(gettext("scanning %s"), $file));
@@
-325,6
+326,7
@@
sub find_src_files (;$$$) {
$page = pagename($file);
if (! exists $pagesources{$page} &&
file_pruned($file)) {
$page = pagename($file);
if (! exists $pagesources{$page} &&
file_pruned($file)) {
+ no warnings 'once';
$File::Find::prune=1;
return;
}
$File::Find::prune=1;
return;
}
@@
-348,7
+350,7
@@
sub find_src_files (;$$$) {
else {
push @files, $f;
if ($pages{$page}) {
else {
push @files, $f;
if ($pages{$page}) {
- debug(sprintf(gettext("%s has multiple possible source
pages
"), $page));
+ debug(sprintf(gettext("%s has multiple possible source
files; one will be chosen at random
"), $page));
}
$pages{$page}=1;
}
}
$pages{$page}=1;
}
@@
-397,7
+399,7
@@
sub process_changed_files ($$) {
}
push @files, $f;
if ($pages{$page}) {
}
push @files, $f;
if ($pages{$page}) {
- debug(sprintf(gettext("%s has multiple possible source
pages
"), $page));
+ debug(sprintf(gettext("%s has multiple possible source
files; one will be chosen at random
"), $page));
}
$pages{$page}=1;
}
}
$pages{$page}=1;
}
@@
-473,7
+475,11
@@
sub find_new_files ($) {
}
$pagecase{lc $page}=$page;
if (! exists $pagectime{$page}) {
}
$pagecase{lc $page}=$page;
if (! exists $pagectime{$page}) {
- my $ctime=(srcfile_stat($file, 1))[10];
+ my @stat=srcfile_stat($file, 1);
+ # For the creation time of the page, take the
+ # inode change time (not creation time!) or
+ # the modification time, whichever is older.
+ my $ctime=($stat[10] < $stat[9] ? $stat[10] : $stat[9]);
$pagectime{$page}=$ctime if defined $ctime;
}
}
$pagectime{$page}=$ctime if defined $ctime;
}
}
@@
-885,9
+891,10
@@
sub refresh () {
# At this point it becomes OK to start matching pagespecs.
$phase = PHASE_RENDER;
# At this point it becomes OK to start matching pagespecs.
$phase = PHASE_RENDER;
- # Save some memory: we no longer need to keep track of which pages
- # we've scanned
- %scanned = ();
+ # Save some memory in full rebuilds: we no longer need to keep
+ # track of which pages we've scanned, because we can assume the
+ # answer is "all of them".
+ %scanned = () if $config{rebuild};
remove_del(@$del, @$internal_del);
remove_del(@$del, @$internal_del);