use Encode;
sub import {
+ hook(type => "checkconfig", id => "autoindex", call => \&checkconfig);
hook(type => "getsetup", id => "autoindex", call => \&getsetup);
hook(type => "refresh", id => "autoindex", call => \&refresh);
IkiWiki::loadplugin("transient");
},
}
+sub checkconfig () {
+ if (! defined $config{autoindex_commit}) {
+ $config{autoindex_commit} = 1;
+ }
+}
+
sub genindex ($) {
my $page=shift;
my $file=newpagefile($page, $config{default_pageext});
my (%pages, %dirs);
foreach my $dir ($config{srcdir}, @{$config{underlaydirs}}, $config{underlaydir}) {
+ next if $dir eq $IkiWiki::Plugin::transient::transientdir;
chdir($dir) || next;
find({