X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dae0f48e91304afcb6ebe0936360e51b22a56548..af63a2ebff201be7173a296aeabfc2713461c543:/IkiWiki/Plugin/meta.pm
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 5bcd65837..d624757ba 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);
} # }}}
@@ -37,6 +37,7 @@ sub preprocess (@) { #{{{
my $page=$params{page};
delete $params{page};
delete $params{destpage};
+ delete $params{preview};
eval q{use HTML::Entities};
# Always dencode, even if encoding later, since it might not be
@@ -61,6 +62,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";