template: Load templates in scan mode

This is potentially expensive, but is necessary so that meta and tag
directives, and other links on templates affect the page using the template
reliably.
master
Joey Hess 2009-02-17 13:30:07 -05:00
parent 84b48681c6
commit 9acc4d578d
4 changed files with 10 additions and 1 deletions

View File

@ -10,7 +10,8 @@ use Encode;
sub import { sub import {
hook(type => "getsetup", id => "template", call => \&getsetup); hook(type => "getsetup", id => "template", call => \&getsetup);
hook(type => "preprocess", id => "template", call => \&preprocess); hook(type => "preprocess", id => "template", call => \&preprocess,
scan => 1);
} }
sub getsetup () { sub getsetup () {

4
debian/changelog vendored
View File

@ -1,6 +1,10 @@
ikiwiki (3.05) UNRELEASED; urgency=low ikiwiki (3.05) UNRELEASED; urgency=low
* debhelper v7.2; rules file minimisation. * debhelper v7.2; rules file minimisation.
* template: Load templates in scan mode.
This is potentially expensive, but is necessary so that meta and tag
directives, and other links on templates affect the page using the
template reliably.
-- Joey Hess <joeyh@debian.org> Sun, 15 Feb 2009 20:11:57 -0500 -- Joey Hess <joeyh@debian.org> Sun, 15 Feb 2009 20:11:57 -0500

View File

@ -14,3 +14,5 @@ scan pass, every page containing a template will cause the template to be
loaded and filled out. This can be some serious additional overhead. loaded and filled out. This can be some serious additional overhead.
--[[Joey]] --[[Joey]]
[[done]]

View File

@ -30,3 +30,5 @@ time, so went ahead and migrated live, spamming planet debian in the process
> [[cannot_reliably_use_meta_in_template]]. AFAIK, this has never worked > [[cannot_reliably_use_meta_in_template]]. AFAIK, this has never worked
> reliably, although the linked page has a simple, though potentially > reliably, although the linked page has a simple, though potentially
> expensive fix. --[[Joey]] > expensive fix. --[[Joey]]
> fix made, [[done]] --[[Joey]]