aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2013-03-04 13:00:33 -0400
committerJoey Hess <joey@kitenet.net>2013-03-04 13:03:34 -0400
commit1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f (patch)
tree55d763d130941320855129471f19ba2356c4eb1b /IkiWiki
parente2405005e6253e5040ffd305534f2bfc91d1e940 (diff)
downloadikiwiki-1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f.tar
ikiwiki-1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f.tar.gz
Add missing plugin section, and deal with missing sections with a warning.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/underlay.pm1
-rw-r--r--IkiWiki/Setup.pm4
2 files changed, 5 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm
index 3ea19c635..2967761c8 100644
--- a/IkiWiki/Plugin/underlay.pm
+++ b/IkiWiki/Plugin/underlay.pm
@@ -18,6 +18,7 @@ sub getsetup () {
plugin => {
safe => 0,
rebuild => undef,
+ section => "special-purpose",
},
add_underlays => {
type => "string",
diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm
index 48f3d4634..881e8a9d5 100644
--- a/IkiWiki/Setup.pm
+++ b/IkiWiki/Setup.pm
@@ -223,6 +223,10 @@ sub commented_dump ($$) {
my $setup=$pair->[1];
my %s=@{$setup};
my $section=$s{plugin}->{section};
+ if (! defined $section) {
+ print STDERR "warning: missing section in $plugin\n";
+ $section="other";
+ }
push @{$section_plugins{$section}}, $plugin;
if (@{$section_plugins{$section}} == 1) {
push @ret, "", $indent.("#" x 70), "$indent# $section plugins",