diff options
author | intrigeri <intrigeri@boum.org> | 2009-03-08 09:50:27 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-03-08 09:50:27 +0100 |
commit | ae474d8e14631ff519ed7d54bb64eaa0538f56d9 (patch) | |
tree | 09637db5faf2632b67b581cf04463fe4493584d4 /IkiWiki/Plugin/underlay.pm | |
parent | 0314ed459ba1c49fad9170a54cc05f1c9e9c96bf (diff) | |
parent | 08e4472fc469c630ebef93e16a66a5a69d9cb33a (diff) |
Merge commit 'upstream/master' into prv/po
Conflicts:
IkiWiki/Plugin/editpage.pm
debian/control
debian/copyright
doc/todo/need_global_renamepage_hook.mdwn
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin/underlay.pm')
-rw-r--r-- | IkiWiki/Plugin/underlay.pm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm new file mode 100644 index 000000000..380d418fb --- /dev/null +++ b/IkiWiki/Plugin/underlay.pm @@ -0,0 +1,40 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::underlay; +# Copyright © 2008 Simon McVittie <http://smcv.pseudorandom.co.uk/> +# Licensed under the GNU GPL, version 2, or any later version published by the +# Free Software Foundation + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "underlay", call => \&getsetup); + hook(type => "checkconfig", id => "underlay", call => \&checkconfig); +} + +sub getsetup () { + return + plugin => { + safe => 0, + rebuild => undef, + }, + add_underlays => { + type => "string", + default => [], + description => "extra underlay directories to add", + advanced => 1, + safe => 0, + rebuild => 1, + }, +} + +sub checkconfig () { + return unless exists $config{add_underlays}; + + foreach my $dir (@{$config{add_underlays}}) { + add_underlay($dir); + } +} + +1; |