aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 19:10:11 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 19:10:11 -0400
commit52bbdbb1a5ce994c9afac253c1d9bfd94acf4d1d (patch)
tree798d8593ef3d780b93fda50d9fbcba3af47e956f /IkiWiki
parentf892cc8c50ea6117fcc908838be58c6c34e1d0ea (diff)
downloadikiwiki-52bbdbb1a5ce994c9afac253c1d9bfd94acf4d1d.tar
ikiwiki-52bbdbb1a5ce994c9afac253c1d9bfd94acf4d1d.tar.gz
load all plugins when generating setup
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/prettydate.pm4
-rw-r--r--IkiWiki/Setup/Standard.pm32
2 files changed, 20 insertions, 16 deletions
diff --git a/IkiWiki/Plugin/prettydate.pm b/IkiWiki/Plugin/prettydate.pm
index 29330f29f..080317f06 100644
--- a/IkiWiki/Plugin/prettydate.pm
+++ b/IkiWiki/Plugin/prettydate.pm
@@ -54,8 +54,8 @@ sub getsetup () { #{{{
rebuild => 1,
},
timetable => {
- type => undef, # don't try to show in interface
- default => '%X, %B %o, %Y',
+ type => "internal",
+ default => undef,
description => "array of time descriptions",
safe => 1,
rebuild => 1,
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index b8ad09144..d8547ba5f 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -78,22 +78,26 @@ sub gendump ($) { #{{{
push @ret, "\t# basic setup";
push @ret, dumpvalues(\%setup, IkiWiki::getsetup());
- push @ret, "";
- # sort rcs plugin first
- my @plugins=sort {
- ($a eq $config{rcs}) <=> ($b eq $config{rcs})
- ||
- $a cmp $b
- } keys %{$IkiWiki::hooks{getsetup}};
+ # Load all plugins, so that all setup options are available.
+ my @plugins=sort(IkiWiki::listplugins());
+ foreach my $plugin (@plugins) {
+ eval { IkiWiki::loadplugin($plugin) };
+ if (exists $IkiWiki::hooks{checkconfig}{$plugin}{call}) {
+ my @s=eval { $IkiWiki::hooks{checkconfig}{$plugin}{call}->() };
+ }
+ }
+ unshift @plugins, $config{rcs} if $config{rcs};
- foreach my $id (sort keys %{$IkiWiki::hooks{getsetup}}) {
- # use an array rather than a hash, to preserve order
- my @s=$IkiWiki::hooks{getsetup}{$id}{call}->();
- return unless @s;
- push @ret, "\t# $id".($id ne $config{rcs} ? " plugin" : "");
- push @ret, dumpvalues(\%setup, @s);
- push @ret, "";
+ foreach my $id (@plugins) {
+ my $title="\t# $id".($id ne $config{rcs} ? " plugin" : "");
+ if (exists $IkiWiki::hooks{getsetup}{$id}{call}) {
+ # use an array rather than a hash, to preserve order
+ my @s=eval { $IkiWiki::hooks{getsetup}{$id}{call}->() };
+ next unless @s;
+ push @ret, "", $title;
+ push @ret, dumpvalues(\%setup, @s);
+ }
}
unshift @ret,