Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a comment
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
sortnaturally.pm
diff --git
a/IkiWiki/Plugin/sortnaturally.pm
b/IkiWiki/Plugin/sortnaturally.pm
index 62e42767c99a48170ddb58c1473b8b49131ad24b..108b489f80d6f7e71916c891345ecea8569e9ed3 100644
(file)
--- 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);
sub import {
hook(type => "getsetup", id => "sortnaturally", call => \&getsetup);
+ hook(type => "checkconfig", id => "sortnaturally", call => \&checkconfig);
}
sub getsetup {
}
sub getsetup {
@@
-29,4
+30,9
@@
sub cmp_title_natural {
IkiWiki::pagetitle(IkiWiki::basename($b)))
}
IkiWiki::pagetitle(IkiWiki::basename($b)))
}
+sub cmp_path_natural {
+ Sort::Naturally::ncmp(IkiWiki::pagetitle($a),
+ IkiWiki::pagetitle($b))
+}
+
1;
1;