X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ffb0802c4a2e48021677a78695d84a356b1b8024..0cd67c515fad03797fa7792c10b507a0abb77c28:/IkiWiki/Plugin/sortnaturally.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index 62e42767c..108b489f8 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -7,6 +7,7 @@ no warnings; sub import { hook(type => "getsetup", id => "sortnaturally", call => \&getsetup); + hook(type => "checkconfig", id => "sortnaturally", call => \&checkconfig); } sub getsetup { @@ -29,4 +30,9 @@ sub cmp_title_natural { IkiWiki::pagetitle(IkiWiki::basename($b))) } +sub cmp_path_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle($a), + IkiWiki::pagetitle($b)) +} + 1;