aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2010-04-03 13:48:30 +0100
committerSimon McVittie <smcv@debian.org>2010-04-03 14:28:21 +0100
commita875ee8be702bd4575e009dc652015c1157c7c2e (patch)
tree91aa52cda28325f2791cb4a234f83fee4a30a259 /doc
parentb86276ffed7ee001b35cd610e5d56e5afb4088cf (diff)
downloadikiwiki-a875ee8be702bd4575e009dc652015c1157c7c2e.tar
ikiwiki-a875ee8be702bd4575e009dc652015c1157c7c2e.tar.gz
Split out sortnaturally into a plugin
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki/pagespec/sorting.mdwn5
-rw-r--r--doc/plugins/sortnaturally.mdwn5
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn
index f27972d4e..ba995a521 100644
--- a/doc/ikiwiki/pagespec/sorting.mdwn
+++ b/doc/ikiwiki/pagespec/sorting.mdwn
@@ -6,9 +6,10 @@ orders can be specified.
* `age` - List pages from the most recently created to the oldest.
* `mtime` - List pages with the most recently modified first.
* `title` - Order by title (page name).
-* `title_natural` - Only available if [[!cpan Sort::Naturally]] is
- installed. Orders by title, but numbers in the title are treated
+[[!if test="enabled(sortnaturally)" then="""
+* `title_natural` - Orders by title, but numbers in the title are treated
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"]]`
or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no
diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn
new file mode 100644
index 000000000..91f373f6b
--- /dev/null
+++ b/doc/plugins/sortnaturally.mdwn
@@ -0,0 +1,5 @@
+[[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]]
+[[!tag type/meta]]
+
+This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order,
+which uses Sort::Naturally to sort numbered pages in a more natural order.