]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/meta.pm
rename: implemented new canrename hook
[git.ikiwiki.info.git] / IkiWiki / Plugin / meta.pm
index ea60be5071f084321346db808e9f99b9b957bb5c..15bb29b3fc8450e693fe4a3005f2f3925ab0f00b 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
 
 use warnings;
 use strict;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %metaheaders;
 
 
 my %metaheaders;
 
@@ -121,6 +121,13 @@ sub preprocess (@) {
                $pagestate{$page}{meta}{authorurl}=$value if safeurl($value);
                # fallthrough
        }
                $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
 
        if (! defined wantarray) {
                # 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') {
-               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);
                if (safeurl($value)) {
                        $pagestate{$page}{meta}{permalink}=$value;
                        push @{$metaheaders{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />', $destpage);