diff options
author | Simon McVittie <smcv@debian.org> | 2011-11-12 15:11:02 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2011-11-12 15:11:02 +0000 |
commit | 272e0b2f17c33c625b494b07f581da400066a216 (patch) | |
tree | 73ed2a4d042cde26081ba2b2d415f9ba933b35e8 /IkiWiki | |
parent | e0c9837566ceaa716639a11fa2e4734be7c74f62 (diff) | |
download | ikiwiki-272e0b2f17c33c625b494b07f581da400066a216.tar ikiwiki-272e0b2f17c33c625b494b07f581da400066a216.tar.gz |
Add path and path_natural sort orders
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/sortnaturally.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index b038b2f9a..108b489f8 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -30,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; |