aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-02-28 00:12:47 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-02-28 00:12:47 -0500
commit60d2dd318f66563c3ee3bde950d7f53426530acc (patch)
treec540152a29cc4112124a6432ef77e9d186e39257 /IkiWiki
parent70972b16874583bb642b093fb9906a0967d69ac3 (diff)
downloadikiwiki-60d2dd318f66563c3ee3bde950d7f53426530acc.tar
ikiwiki-60d2dd318f66563c3ee3bde950d7f53426530acc.tar.gz
Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 3ebb1a324..af24df155 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -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();