diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-10-15 16:25:43 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-10-15 16:25:43 -0400 |
commit | d0213917ad143c57f34a96c94ceaaf40122b11cf (patch) | |
tree | 7eb8f6d7bd404727eb574fbef7669f710c7beea1 | |
parent | 5a41e6054a7b0782069e4da08a6ab47ffb352392 (diff) |
inline: Optimize generation of archives, etc
Don't generate inlined page content if the template does not use it.
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 3 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 4 insertions, 1 deletions
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 <joeyh@debian.org> Fri, 09 Oct 2009 19:53:50 -0400 |