]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/meta.pm
rename hook: run once per file to be renamed
[git.ikiwiki.info.git] / IkiWiki / Plugin / meta.pm
index 8c214139f8b85f3630055a7b954213ec9645ebbf..4a22fed3057015156c27d9f8159e9f4b47e3a633 100644 (file)
@@ -4,7 +4,7 @@ package IkiWiki::Plugin::meta;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %metaheaders;
 
@@ -128,6 +128,13 @@ sub preprocess (@) {
                        $IkiWiki::pagectime{$page}=$time if defined $time;
                }
        }
+       elsif ($key eq 'updated') {
+               eval q{use Date::Parse};
+               if (! $@) {
+                       my $time = str2time($value);
+                       $pagestate{$page}{meta}{updated}=$time if defined $time;
+               }
+       }
 
        if (! defined wantarray) {
                # avoid collecting duplicate data during scan pass