aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2015-06-11 08:33:04 +0100
committerSimon McVittie <smcv@debian.org>2015-06-13 19:58:37 +0100
commitf2365c3e660fe0b00a051ce893cdcad0016e560e (patch)
tree9784097bbe202b2a390fea829980e16c57e861d0
parent8f1d5110517877339e31e5a2650cc625858d87cb (diff)
downloadikiwiki-f2365c3e660fe0b00a051ce893cdcad0016e560e.tar
ikiwiki-f2365c3e660fe0b00a051ce893cdcad0016e560e.tar.gz
inline: change default sort order from age to "age title" for determinism
-rw-r--r--IkiWiki/Plugin/inline.pm11
-rw-r--r--debian/changelog6
-rw-r--r--doc/ikiwiki/directive/inline.mdwn4
3 files changed, 15 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 300941943..416df1e28 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -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) : ()),
);
diff --git a/debian/changelog b/debian/changelog
index 5744a09b2..d29819f97 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 ]
diff --git a/doc/ikiwiki/directive/inline.mdwn b/doc/ikiwiki/directive/inline.mdwn
index a4632a5b4..32fecd1bf 100644
--- a/doc/ikiwiki/directive/inline.mdwn
+++ b/doc/ikiwiki/directive/inline.mdwn
@@ -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.