]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Process files from @autofiles in refresh().
authorDavid Riebenbauer <davrieb@liegesta.at>
Sun, 31 Jan 2010 01:23:11 +0000 (02:23 +0100)
committerDavid Riebenbauer <davrieb@liegesta.at>
Tue, 2 Feb 2010 13:04:28 +0000 (14:04 +0100)
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.

IkiWiki/Render.pm

index 44b2fb9c235f0c1d81b04cf054074661d30dfcd3..dd4d9ca0cfe4994544b6d2a0ddebb57a7fc52e8e 100644 (file)
@@ -642,6 +642,20 @@ sub refresh () {
                scan($file);
        }
 
                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);
        calculate_links();
        
        remove_del(@$del, @$internal_del);