inline: Ignore parent dirs when sorting pages by title.
[ikiwiki.git] / IkiWiki / Plugin / inline.pm
index 9c336e7d7cb57c3ce98a8d9786e1b2fb96a0d71e..1a6c7cfcd580ac35b755a8a3a446c77521aad0e1 100644 (file)
@@ -186,7 +186,7 @@ sub preprocess_inline (@) { #{{{
        }
 
        if (exists $params{sort} && $params{sort} eq 'title') {
-               @list=sort @list;
+               @list=sort { pagetitle(basename($a)) cmp pagetitle(basename($b)) } @list;
        }
        elsif (exists $params{sort} && $params{sort} eq 'mtime') {
                @list=sort { $pagemtime{$b} <=> $pagemtime{$a} } @list;