response
[ikiwiki.git] / IkiWiki / Plugin / underlay.pm
blob3ea19c63519bdecf6cd7331d21d722b3e0bc72de
1 #!/usr/bin/perl
2 package IkiWiki::Plugin::underlay;
3 # Copyright © 2008 Simon McVittie <http://smcv.pseudorandom.co.uk/>
4 # Licensed under the GNU GPL, version 2, or any later version published by the
5 # Free Software Foundation
7 use warnings;
8 use strict;
9 use IkiWiki 3.00;
11 sub import {
12 hook(type => "getsetup", id => "underlay", call => \&getsetup);
13 hook(type => "checkconfig", id => "underlay", call => \&checkconfig);
16 sub getsetup () {
17 return
18 plugin => {
19 safe => 0,
20 rebuild => undef,
22 add_underlays => {
23 type => "string",
24 example => ["$ENV{HOME}/wiki.underlay"],
25 description => "extra underlay directories to add",
26 advanced => 1,
27 safe => 0,
28 rebuild => 1,
32 sub checkconfig () {
33 if ($config{add_underlays}) {
34 foreach my $dir (@{$config{add_underlays}}) {
35 add_underlay($dir);