]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
meta: Process meta date during scan pass so that the date will always affect sorting...
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 21 Dec 2008 06:52:08 +0000 (01:52 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 21 Dec 2008 06:52:08 +0000 (01:52 -0500)
IkiWiki/Plugin/meta.pm
debian/changelog
doc/bugs/inline_sort_order_and_meta_date_value.mdwn

index ea60be5071f084321346db808e9f99b9b957bb5c..8c214139f8b85f3630055a7b954213ec9645ebbf 100644 (file)
@@ -121,6 +121,13 @@ sub preprocess (@) {
                $pagestate{$page}{meta}{authorurl}=$value if safeurl($value);
                # 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) {
                # avoid collecting duplicate data during scan pass
@@ -128,14 +135,7 @@ sub preprocess (@) {
        }
 
        # Metadata collection that happens only during preprocessing pass.
-       if ($key eq 'date') {
-               eval q{use Date::Parse};
-               if (! $@) {
-                       my $time = str2time($value);
-                       $IkiWiki::pagectime{$page}=$time if defined $time;
-               }
-       }
-       elsif ($key eq 'permalink') {
+       if ($key eq 'permalink') {
                if (safeurl($value)) {
                        $pagestate{$page}{meta}{permalink}=$value;
                        push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage);
index d8685db09d26c3b202e6fc3d334709a9258ed7c4..056fabc7d4adf8a73ac56d44cd5e9cbd82ad8bad 100644 (file)
@@ -23,6 +23,8 @@ ikiwiki (2.71) UNRELEASED; urgency=low
   * aggregate: If a feed fails to be downloaded, try again immediatly
     next time aggregation is run, even if the usual time has not passed.
     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
 
index 21965775398da5e577d2f17227a5b4c612c2bef1..d4ec8f345e5fc3b7348742ec50559f9c3a9473da 100644 (file)
@@ -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.
 
 This can probably be avoided by processing meta date at scan time.
+
+Verified, fix works. [[done]]
 --[[Joey]]