* Patch from Ethan to allow using meta tags to set creation dates of pages.
[ikiwiki.git] / IkiWiki / Plugin / meta.pm
index 2e5fd7e76959deaa7aed03445284c2b8bb4fb59c..5867329afd74ed0c2b94df12caad61d6d19a50ab 100644 (file)
@@ -61,6 +61,13 @@ sub preprocess (@) { #{{{
                $permalink{$page}=$value;
                $meta{$page}.="<link rel=\"bookmark\" href=\"".encode_entities($value)."\" />\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}.="<meta name=\"".encode_entities($key).
                        "\" content=\"".encode_entities($value)."\" />\n";