]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
rename hook: run once per file to be renamed
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index b88efc0bae9be84d13e754a54b8dffc61aa5cfde..2205ebffc48cda2f9ccd6fab71dec170765fa880 100644 (file)
@@ -22,7 +22,7 @@ sub import {
                call => \&IkiWiki::preprocess_inline);
        hook(type => "pagetemplate", id => "inline",
                call => \&IkiWiki::pagetemplate_inline);
-       hook(type => "format", id => "inline", call => \&format);
+       hook(type => "format", id => "inline", call => \&format, first => 1);
        # Hook to change to do pinging since it's called late.
        # This ensures each page only pings once and prevents slow
        # pings interrupting page builds.
@@ -519,9 +519,15 @@ sub genfeed ($$$$$@) {
                        mdate_3339 => date_3339($pagemtime{$p}),
                );
 
-               if (exists $pagestate{$p} &&
-                   exists $pagestate{$p}{meta}{guid}) {
-                       $itemtemplate->param(guid => $pagestate{$p}{meta}{guid});
+               if (exists $pagestate{$p}) {
+                       if (exists $pagestate{$p}{meta}{guid}) {
+                               $itemtemplate->param(guid => $pagestate{$p}{meta}{guid});
+                       }
+
+                       if (exists $pagestate{$p}{meta}{updated}) {
+                               $itemtemplate->param(mdate_822 => date_822($pagestate{$p}{meta}{updated}));
+                               $itemtemplate->param(mdate_3339 => date_3339($pagestate{$p}{meta}{updated}));
+                       }
                }
 
                if ($itemtemplate->query(name => "enclosure")) {