]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
inline: change default sort order from age to "age title" for determinism
authorSimon McVittie <smcv@debian.org>
Thu, 11 Jun 2015 07:33:04 +0000 (08:33 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 13 Jun 2015 18:58:37 +0000 (19:58 +0100)
IkiWiki/Plugin/inline.pm
debian/changelog
doc/ikiwiki/directive/inline.mdwn

index 300941943b298be6142713005ee681f6e55cd8df..416df1e280835f058ecff31afdad87b6088f9ad9 100644 (file)
@@ -160,16 +160,17 @@ sub preprocess_inline (@) {
                # Running in scan mode: only do the essentials
 
                if (yesno($params{trail}) && IkiWiki::Plugin::trail->can("preprocess_trailitems")) {
-                       # default to sorting age, the same as inline itself,
-                       # but let the params override that
-                       IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age', %params);
+                       # default to sorting by age with fallback to title,
+                       # the same as inline itself, but let the params
+                       # override that
+                       IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age title', %params);
                }
 
                return;
        }
 
        if (yesno($params{trail}) && IkiWiki::Plugin::trail->can("preprocess_trailitems")) {
-               scalar IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age', %params);
+               scalar IkiWiki::Plugin::trail::preprocess_trailitems(sort => 'age title', %params);
        }
 
        my $raw=yesno($params{raw});
@@ -245,7 +246,7 @@ sub preprocess_inline (@) {
                @list = pagespec_match_list($params{page}, $params{pages},
                        deptype => deptype($quick ? "presence" : "content"),
                        filter => sub { $_[0] eq $params{page} },
-                       sort => exists $params{sort} ? $params{sort} : "age",
+                       sort => exists $params{sort} ? $params{sort} : "age title",
                        reverse => yesno($params{reverse}),
                        ($num ? (num => $num) : ()),
                );
index 5744a09b23097862cf72412d5279c09235fddc7f..d29819f97fb41b868557d2c700ba5866171cdbbd 100644 (file)
@@ -1,3 +1,9 @@
+ikiwiki (3.20150611) UNRELEASED; urgency=medium
+
+  * inline: change default sort order from age to "age title" for determinism
+
+ -- Simon McVittie <smcv@debian.org>  Thu, 11 Jun 2015 08:32:35 +0100
+
 ikiwiki (3.20150610) unstable; urgency=low
 
   [ Joey Hess ]
index a4632a5b4c4111151b7249ffd2a7dfa8bbb181eb..32fecd1bfb44e372f82f0b46cbcbefbd6f15a79f 100644 (file)
@@ -94,7 +94,9 @@ Here are some less often needed parameters:
   markup around it, as if it were a literal part of the source of the 
   inlining page.
 * `sort` - Controls how inlined pages are [[sorted|pagespec/sorting]].
-  The default is to sort the newest created pages first.
+  The default is to sort the newest created pages first, and if pages
+  were created in the same commit, sort them by the name of the page
+  (equivalent to `sort="age title"`).
 * `reverse` - If set to "yes", causes the sort order to be reversed.
 * `feedshow` - Specify the maximum number of matching pages to include in
   the rss/atom feeds. The default is the same as the `show` value above.