don't process data metadata in scan, as it's expensive and the metadata should not...
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 9 Jan 2008 07:41:38 +0000 (02:41 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 9 Jan 2008 07:41:38 +0000 (02:41 -0500)
IkiWiki/Plugin/meta.pm

index 586dbcb811a45b3091957dd120c8833a8d69ba07..42fddb0bb695855ecbedec0001f8d395e4d66957 100644 (file)
@@ -81,13 +81,6 @@ sub preprocess (@) { #{{{
        if ($key eq 'title') {
                $title{$page}=HTML::Entities::encode_numeric($value);
        }
-       elsif ($key eq 'date') {
-               eval q{use Date::Parse};
-               if (! $@) {
-                       my $time = str2time($value);
-                       $IkiWiki::pagectime{$page}=$time if defined $time;
-               }
-       }
        elsif ($key eq 'license') {
                push @{$meta{$page}}, '<link rel="license" href="#page_license" />';
                $license{$page}=$value;
@@ -118,7 +111,14 @@ sub preprocess (@) { #{{{
        }
 
        # Metadata collection that happens only during preprocessing pass.
-       if ($key eq 'permalink') {
+       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') {
                $permalink{$page}=$value;
                push @{$meta{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />');
        }