X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/dae0f48e91304afcb6ebe0936360e51b22a56548..122636308f908e877342a9ec2b361eaba2e9b637:/IkiWiki/Plugin/meta.pm diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 5bcd65837..5867329af 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,7 +13,7 @@ my %author; my %authorurl; sub import { #{{{ - hook(type => "preprocess", id => "meta", call => \&preprocess); + hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "filter", id => "meta", call => \&filter); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); } # }}} @@ -61,6 +61,13 @@ sub preprocess (@) { #{{{ $permalink{$page}=$value; $meta{$page}.="\n"; } + elsif ($key eq 'date') { + eval q{use Date::Parse}; + if (! $@) { + my $time = str2time($value); + $IkiWiki::pagectime{$page}=$time if defined $time; + } + } else { $meta{$page}.="\n";