X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/54f600af14bf6dc067ffc30ec6f22d517001fe99..9faa0f3c6560be7b5e3aea0f8ca12e04a8c85a32:/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;