aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-09 02:41:38 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-09 02:41:38 -0500
commitadb1bc8761efd7ff7c45abc8c5c503c95c09b402 (patch)
tree77db091187d00c1815f1cae144bc89a3452f4174 /IkiWiki
parentdeb39a1f14a840761f32011f28fe698015d8b298 (diff)
downloadikiwiki-adb1bc8761efd7ff7c45abc8c5c503c95c09b402.tar
ikiwiki-adb1bc8761efd7ff7c45abc8c5c503c95c09b402.tar.gz
don't process data metadata in scan, as it's expensive and the metadata should not be needed so early
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/meta.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 586dbcb81..42fddb0bb 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -81,13 +81,6 @@ sub preprocess (@) { #{{{
if ($key eq 'title') {
$title{$page}=HTML::Entities::encode_numeric($value);
}
- elsif ($key eq 'date') {
- eval q{use Date::Parse};
- if (! $@) {
- my $time = str2time($value);
- $IkiWiki::pagectime{$page}=$time if defined $time;
- }
- }
elsif ($key eq 'license') {
push @{$meta{$page}}, '<link rel="license" href="#page_license" />';
$license{$page}=$value;
@@ -118,7 +111,14 @@ sub preprocess (@) { #{{{
}
# Metadata collection that happens only during preprocessing pass.
- if ($key eq 'permalink') {
+ if ($key eq 'date') {
+ eval q{use Date::Parse};
+ if (! $@) {
+ my $time = str2time($value);
+ $IkiWiki::pagectime{$page}=$time if defined $time;
+ }
+ }
+ elsif ($key eq 'permalink') {
$permalink{$page}=$value;
push @{$meta{$page}}, scrub('<link rel="bookmark" href="'.encode_entities($value).'" />');
}