]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Rename sort parameter to meta title/author to sortas=bar
authorSimon McVittie <smcv@debian.org>
Sat, 3 Apr 2010 13:19:18 +0000 (14:19 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 4 Apr 2010 00:43:02 +0000 (01:43 +0100)
Joey pointed out that sort=x usually takes a sort order.

IkiWiki/Plugin/meta.pm
doc/ikiwiki/directive/meta.mdwn
doc/ikiwiki/pagespec/sorting.mdwn

index c9fdbc9341ac32f899be991a4956fa06b2a5b96c..4992617d02376c15f822d586550c04c397e4795f 100644 (file)
@@ -89,8 +89,8 @@ sub preprocess (@) {
        # Metadata collection that needs to happen during the scan pass.
        if ($key eq 'title') {
                $pagestate{$page}{meta}{title}=HTML::Entities::encode_numeric($value);
-               if (exists $params{sort}) {
-                       $pagestate{$page}{meta}{titlesort}=$params{sort};
+               if (exists $params{sortas}) {
+                       $pagestate{$page}{meta}{titlesort}=$params{sortas};
                }
                else {
                        $pagestate{$page}{meta}{titlesort}=$value;
@@ -122,8 +122,8 @@ sub preprocess (@) {
        }
        elsif ($key eq 'author') {
                $pagestate{$page}{meta}{author}=$value;
-               if (exists $params{sort}) {
-                       $pagestate{$page}{meta}{authorsort}=$params{sort};
+               if (exists $params{sortas}) {
+                       $pagestate{$page}{meta}{authorsort}=$params{sortas};
                }
                else {
                        $pagestate{$page}{meta}{authorsort}=$value;
index c5f74fac5a8c00b25096945a6f29f4ef30f00182..5a3919dea63aeee57271fca7af4f84deff84952e 100644 (file)
@@ -23,12 +23,12 @@ Supported fields:
   be set to a true value in the template; this can be used to format things
   differently in this case.
 
-  An optional `sort` parameter will be used preferentially when
+  An optional `sortas` parameter will be used preferentially when
   [[ikiwiki/pagespec/sorting]] by `meta(title)`:
 
-       \[[!meta title="The Beatles" sort="Beatles, The"]]
+       \[[!meta title="The Beatles" sortas="Beatles, The"]]
 
-       \[[!meta title="David Bowie" sort="Bowie, David"]]
+       \[[!meta title="David Bowie" sortas="Bowie, David"]]
 
 * license
 
@@ -44,10 +44,10 @@ Supported fields:
 
   Specifies the author of a page.
 
-  An optional `sort` parameter will be used preferentially when
+  An optional `sortas` parameter will be used preferentially when
   [[ikiwiki/pagespec/sorting]] by `meta(author)`:
 
-       \[[!meta author="Joey Hess" sort="Hess, Joey"]]
+       \[[!meta author="Joey Hess" sortas="Hess, Joey"]]
 
 * authorurl
 
index fbf598340983633616be065aa18ce5e10f508f27..5c6cfcc2b99c8332db0146a6dd147175216a5b13 100644 (file)
@@ -11,7 +11,7 @@ orders can be specified.
   as such, ("1 2 9 10 20" instead of "1 10 2 20 9")
 """]]
 [[!if test="enabled(meta)" then="""
-* `meta(title)` - Order according to the `\[[!meta title="foo" sort="bar"]]`
+* `meta(title)` - Order according to the `\[[!meta title="foo" sortas="bar"]]`
   or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no
   full title was set. `meta(author)`, `meta(date)`, `meta(updated)`, etc.
   also work.