sub import {
hook(type => "getsetup", id => "sortnaturally", call => \&getsetup);
+ hook(type => "checkconfig", id => "sortnaturally", call => \&checkconfig);
}
sub getsetup {
return
plugin => {
safe => 1,
- rebuild => 1,
+ rebuild => undef,
},
}
package IkiWiki::SortSpec;
sub cmp_title_natural {
- Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])),
- IkiWiki::pagetitle(IkiWiki::basename($_[1])))
+ Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($a)),
+ IkiWiki::pagetitle(IkiWiki::basename($b)))
+}
+
+sub cmp_path_natural {
+ Sort::Naturally::ncmp(IkiWiki::pagetitle($a),
+ IkiWiki::pagetitle($b))
}
1;