From: Gabriel McManus Date: Sun, 20 Jul 2008 07:40:16 +0000 (+1000) Subject: Rebuild pages that change their type. X-Git-Tag: 2.55~60^2~1 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/d9062864ee7ad8248ad41c0b1cd17ec5f2f4dafc?ds=sidebyside;hp=7fa3a2f83b1f5e67c96072a1a2185c36b0867332 Rebuild pages that change their type. Previously, if a page changed its type but not its mtime (e.g. mv page.txt page.mdwn), then it would not be rebuilt. Now, check if the source of a page has changed, in which case force a rebuild of that page. (cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843) --- diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index ab3ccd7ae..90058199c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -319,6 +319,10 @@ sub refresh () { #{{{ # check for added or removed pages foreach my $file (@files) { my $page=pagename($file); + if (exists $pagesources{$page} && $pagesources{$page} ne $file) { + # the page has changed its type + $forcerebuild{$page}=1; + } $pagesources{$page}=$file; if (! $pagemtime{$page}) { if (isinternal($page)) {