]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/meta.pm
Avoid %links accumulating duplicates. (For TOVA)
[ikiwiki.git] / IkiWiki / Plugin / meta.pm
index 15bb29b3fc8450e693fe4a3005f2f3925ab0f00b..cc5455d64042ae3afef8bcd7e52a42e0ec1ad915 100644 (file)
@@ -110,7 +110,7 @@ sub preprocess (@) {
        }
        elsif ($key eq 'link' && ! %params) {
                # hidden WikiLink
-               push @{$links{$page}}, $value;
+               add_link($page, $value);
                return "";
        }
        elsif ($key eq 'author') {
@@ -128,6 +128,13 @@ sub preprocess (@) {
                        $IkiWiki::pagectime{$page}=$time if defined $time;
                }
        }
+       elsif ($key eq 'updated') {
+               eval q{use Date::Parse};
+               if (! $@) {
+                       my $time = str2time($value);
+                       $pagestate{$page}{meta}{updated}=$time if defined $time;
+               }
+       }
 
        if (! defined wantarray) {
                # avoid collecting duplicate data during scan pass