diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-15 05:48:40 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-15 05:48:40 +0000 |
commit | f850acc6ad8a780a6b913df1099b8563647de03d (patch) | |
tree | 252f89382ab86f63a55fc4f8c181f5e609dc1076 /IkiWiki/Plugin | |
parent | cf2aabd6c87bd1dd3927016ed181180b765156fd (diff) |
* Patch from Ethan to allow using meta tags to set creation dates of pages.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 2e5fd7e76..5867329af 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -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"; |