From d0213917ad143c57f34a96c94ceaaf40122b11cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Oct 2009 16:25:43 -0400 Subject: [PATCH] inline: Optimize generation of archives, etc Don't generate inlined page content if the template does not use it. --- IkiWiki/Plugin/inline.pm | 3 ++- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 0fe0bd2e1..553fd350c 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -337,7 +337,8 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if (! $raw || ($raw && ! defined $type)) { - unless ($archive && $quick) { + if (!($archive && $quick) && + $template->query(name => 'content')) { # Get the content before populating the # template, since getting the content uses # the same template if inlines are nested. diff --git a/debian/changelog b/debian/changelog index ef92e48fc..eab725d92 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ ikiwiki (3.2009XXXX) UNRELEASED; urgency=low * calendar: Fix CSS for year calendar to match the plugin documentation. * Added minimal default CSS for calendar plugin, just highlighting the current day. + * inline: Optimize generation of archives, etc by not getting inlined page + content if the template does not use it. -- Joey Hess Fri, 09 Oct 2009 19:53:50 -0400 -- 2.32.0.93.g670b81a890