aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2011-11-12 15:11:02 +0000
committerJoey Hess <joey@kitenet.net>2011-12-06 14:26:27 -0400
commit5333c113d62acd0b82551e499863abaf749a6a1f (patch)
treead524c1997631abc672d33742da3b71ea38b8fee /IkiWiki/Plugin
parent30938ee2551cf0b4cb979f7bddeae1cf78cc4baf (diff)
downloadikiwiki-5333c113d62acd0b82551e499863abaf749a6a1f.tar
ikiwiki-5333c113d62acd0b82551e499863abaf749a6a1f.tar.gz
Add path and path_natural sort orders
(cherry picked from commit 272e0b2f17c33c625b494b07f581da400066a216)
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/sortnaturally.pm5
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;