meta: Process meta date during scan pass so that the date will always affect sorting in inlines.
parent
da947bea4b
commit
c84fcdd32a
|
@ -121,6 +121,13 @@ sub preprocess (@) {
|
||||||
$pagestate{$page}{meta}{authorurl}=$value if safeurl($value);
|
$pagestate{$page}{meta}{authorurl}=$value if safeurl($value);
|
||||||
# fallthrough
|
# fallthrough
|
||||||
}
|
}
|
||||||
|
elsif ($key eq 'date') {
|
||||||
|
eval q{use Date::Parse};
|
||||||
|
if (! $@) {
|
||||||
|
my $time = str2time($value);
|
||||||
|
$IkiWiki::pagectime{$page}=$time if defined $time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! defined wantarray) {
|
if (! defined wantarray) {
|
||||||
# avoid collecting duplicate data during scan pass
|
# avoid collecting duplicate data during scan pass
|
||||||
|
@ -128,14 +135,7 @@ sub preprocess (@) {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Metadata collection that happens only during preprocessing pass.
|
# Metadata collection that happens only during preprocessing pass.
|
||||||
if ($key eq 'date') {
|
if ($key eq 'permalink') {
|
||||||
eval q{use Date::Parse};
|
|
||||||
if (! $@) {
|
|
||||||
my $time = str2time($value);
|
|
||||||
$IkiWiki::pagectime{$page}=$time if defined $time;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elsif ($key eq 'permalink') {
|
|
||||||
if (safeurl($value)) {
|
if (safeurl($value)) {
|
||||||
$pagestate{$page}{meta}{permalink}=$value;
|
$pagestate{$page}{meta}{permalink}=$value;
|
||||||
push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage);
|
push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage);
|
||||||
|
|
|
@ -23,6 +23,8 @@ ikiwiki (2.71) UNRELEASED; urgency=low
|
||||||
* aggregate: If a feed fails to be downloaded, try again immediatly
|
* aggregate: If a feed fails to be downloaded, try again immediatly
|
||||||
next time aggregation is run, even if the usual time has not passed.
|
next time aggregation is run, even if the usual time has not passed.
|
||||||
Closes: #508622 (Michael Gold)
|
Closes: #508622 (Michael Gold)
|
||||||
|
* meta: Process meta date during scan pass so that the date will always
|
||||||
|
affect sorting in inlines.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 17 Nov 2008 14:02:10 -0500
|
-- Joey Hess <joeyh@debian.org> Mon, 17 Nov 2008 14:02:10 -0500
|
||||||
|
|
||||||
|
|
|
@ -309,4 +309,6 @@ available at the time that they are inlined, and the newer unix ctime is
|
||||||
used. On the second build, the meta data has already been recorded.
|
used. On the second build, the meta data has already been recorded.
|
||||||
|
|
||||||
This can probably be avoided by processing meta date at scan time.
|
This can probably be avoided by processing meta date at scan time.
|
||||||
|
|
||||||
|
Verified, fix works. [[done]]
|
||||||
--[[Joey]]
|
--[[Joey]]
|
||||||
|
|
Loading…
Reference in New Issue