aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorDavid Riebenbauer <davrieb@liegesta.at>2010-01-31 02:23:11 +0100
committerDavid Riebenbauer <davrieb@liegesta.at>2010-02-02 14:04:28 +0100
commitf3c59ed3e52f6e68e73338f6e7799a4de7b6f9d6 (patch)
treebba85a6947afa3ddef813f2c7b3498749b456962 /IkiWiki
parentb18fde2bde0c7d445fd4aab3cd35add8c211aab4 (diff)
downloadikiwiki-f3c59ed3e52f6e68e73338f6e7799a4de7b6f9d6.tar
ikiwiki-f3c59ed3e52f6e68e73338f6e7799a4de7b6f9d6.tar.gz
Process files from @autofiles in refresh().
To make automatically added files render they have to be added to the $files, $pages, $new, and $changed variables. After that scan() is called on them.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 44b2fb9c2..dd4d9ca0c 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -642,6 +642,20 @@ sub refresh () {
scan($file);
}
+ while (my $autofile = shift (@autofiles)) {
+ my $page=pagename($autofile);
+ if ($pages->{$page}) {
+ debug(sprintf(gettext("%s has multiple possible source pages"), $page));
+ }
+ $pages->{$page}=1;
+
+ push @{$files}, $autofile;
+ push @{$new}, $autofile if find_new_files([$autofile]);
+ push @{$changed}, $autofile if find_changed([$autofile]);
+
+ scan($autofile);
+ }
+
calculate_links();
remove_del(@$del, @$internal_del);