]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 2df59f414b026eab4ea4fdcf508b6dd3f58a6ae0..20c5f3bddc08473bd06f27dfa5f5c3e35e1b22c0 100644 (file)
@@ -362,6 +362,7 @@ sub preprocess_inline (@) {
                                $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
                                $template->param(first => 1) if $page eq $list[0];
                                $template->param(last => 1) if $page eq $list[$#list];
+                               $template->param(html5 => $config{html5});
        
                                if ($actions) {
                                        my $file = $pagesources{$page};
@@ -475,6 +476,13 @@ sub get_inline_content ($$) {
                       filter($page, $destpage,
                       readfile(srcfile($file))))));
                $nested--;
+               if (isinternal($page)) {
+                       # make inlined text of internal pages searchable
+                       run_hooks(indexhtml => sub {
+                               shift->(page => $page, destpage => $page,
+                                       content => $ret);
+                       });
+               }
        }
        
        if ($cached_destpage ne $destpage) {
@@ -562,9 +570,9 @@ sub genfeed ($$$$$@) {
                        }
                }
 
+               my $file=$pagesources{$p};
+               my $type=pagetype($file);
                if ($itemtemplate->query(name => "enclosure")) {
-                       my $file=$pagesources{$p};
-                       my $type=pagetype($file);
                        if (defined $type) {
                                $itemtemplate->param(content => $pcontent);
                        }
@@ -583,6 +591,7 @@ sub genfeed ($$$$$@) {
                        }
                }
                else {
+                       next unless defined $type;
                        $itemtemplate->param(content => $pcontent);
                }