]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Render.pm
they do work, with the right syntax (C backslash escapes aren't interpreted)
[git.ikiwiki.info.git] / IkiWiki / Render.pm
index 3ebb1a324d8a3118b54f0d7c6360587892917b65..abafb0887f32b0a6fcc25115b6ecb6be63bc4d6a 100644 (file)
@@ -565,7 +565,7 @@ sub render_dependent ($$$$$$$) {
                if (exists $depends{$p} && ! defined $reason) {
                        foreach my $dep (keys %{$depends{$p}}) {
                                my $sub=pagespec_translate($dep);
-                               next if $@ || ! defined $sub;
+                               next unless defined $sub;
 
                                # only consider internal files
                                # if the page explicitly depends
@@ -683,6 +683,17 @@ sub refresh () {
        }
 }
 
+sub clean_rendered {
+       lockwiki();
+       loadindex();
+       remove_unrendered();
+       foreach my $page (keys %oldrenderedfiles) {
+               foreach my $file (@{$oldrenderedfiles{$page}}) {
+                       prune($config{destdir}."/".$file);
+               }
+       }
+}
+
 sub commandline_render () {
        lockwiki();
        loadindex();