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 /doc/patchqueue | |
parent | cf2aabd6c87bd1dd3927016ed181180b765156fd (diff) |
* Patch from Ethan to allow using meta tags to set creation dates of pages.
Diffstat (limited to 'doc/patchqueue')
-rw-r--r-- | doc/patchqueue/meta_param_to_set_ctime.mdwn | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/doc/patchqueue/meta_param_to_set_ctime.mdwn b/doc/patchqueue/meta_param_to_set_ctime.mdwn deleted file mode 100644 index 5fc498862..000000000 --- a/doc/patchqueue/meta_param_to_set_ctime.mdwn +++ /dev/null @@ -1,29 +0,0 @@ -It would be nice to backdate some posts, so they can be sorted easier "by -hand" when the ctime of the actual file is not what you want. - -The patch is [here](http://ikidev.betacantrips.com/patches/meta-date.patch). - -You can see it in use [here](http://ikidev.betacantrips.com/metadate/). - - diff -urX ignorepats ikiclean/IkiWiki/Plugin/meta.pm ikidev/IkiWiki/Plugin/meta.pm - --- ikiclean/IkiWiki/Plugin/meta.pm 2007-02-11 21:40:32.002000000 -0800 - +++ ikidev/IkiWiki/Plugin/meta.pm 2007-02-12 07:44:11.182418000 -0800 - @@ -5,6 +5,7 @@ - use warnings; - use strict; - use IkiWiki; - +use Date::Parse; - - my %meta; - my %title; - @@ -61,6 +62,10 @@ - $permalink{$page}=$value; - $meta{$page}.="<link rel=\"bookmark\" href=\"".encode_entities($value)."\" />\n"; - } - + elsif ($key eq 'date') { - + my $time = str2time($value); - + $IkiWiki::pagectime{$page}=$time; - + } - else { - $meta{$page}.="<meta name=\"".encode_entities($key). - "\" content=\"".encode_entities($value)."\" />\n"; |