summaryrefslogtreecommitdiff
path: root/doc/ikiwiki/pagespec
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ikiwiki/pagespec')
-rw-r--r--doc/ikiwiki/pagespec/attachment.mdwn9
-rw-r--r--doc/ikiwiki/pagespec/discussion.mdwn11
-rw-r--r--doc/ikiwiki/pagespec/po.mdwn2
-rw-r--r--doc/ikiwiki/pagespec/sorting.mdwn21
4 files changed, 36 insertions, 7 deletions
diff --git a/doc/ikiwiki/pagespec/attachment.mdwn b/doc/ikiwiki/pagespec/attachment.mdwn
index 419f00ee4..fa2bc5867 100644
--- a/doc/ikiwiki/pagespec/attachment.mdwn
+++ b/doc/ikiwiki/pagespec/attachment.mdwn
@@ -7,11 +7,12 @@ If attachments are enabled, the wiki admin can control what types of
attachments will be accepted, via the `allowed_attachments`
configuration setting.
-For example, to limit arbitrary files to 50 kilobytes, but allow
-larger mp3 files to be uploaded by joey into a specific directory, and
-check all attachments for viruses, something like this could be used:
+For example, to limit most users to uploading small images, and nothing else,
+while allowing larger mp3 files to be uploaded by joey into a specific
+directory, and check all attachments for viruses, something like this could be
+used:
- virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (!ispage() and maxsize(50kb)))
+ virusfree() and ((user(joey) and podcast/*.mp3 and mimetype(audio/mpeg) and maxsize(15mb)) or (mimetype(image/*) and maxsize(50kb)))
The regular [[ikiwiki/PageSpec]] syntax is expanded with the following
additional tests:
diff --git a/doc/ikiwiki/pagespec/discussion.mdwn b/doc/ikiwiki/pagespec/discussion.mdwn
index 4eed3722c..4c553925a 100644
--- a/doc/ikiwiki/pagespec/discussion.mdwn
+++ b/doc/ikiwiki/pagespec/discussion.mdwn
@@ -92,3 +92,14 @@ does not seem suitable for this, as
> \[[!map pages="./*"]]
also lists the current page and all its siblings.
+
+---
+
+I am a little lost. I want to match the start page `/index.mdwn`. So I use
+
+ \[[!inline pages="/index"]]
+
+which does not work though. I also tried it in this Wiki. Just take a look at the end of the [[SandBox|sandbox]]. --[[PaulePanter]]
+
+> Unlike wikilinks, pagespecs match relative to the top of the wiki by
+> default. So lose the "/" and it will work. --[[Joey]]
diff --git a/doc/ikiwiki/pagespec/po.mdwn b/doc/ikiwiki/pagespec/po.mdwn
index e0264dd50..40ed9efb6 100644
--- a/doc/ikiwiki/pagespec/po.mdwn
+++ b/doc/ikiwiki/pagespec/po.mdwn
@@ -14,3 +14,5 @@ wiki:
Note that every non-po page is considered to be written in
`po_master_language`, as specified in `ikiwiki.setup`.
+
+[[!meta robots="noindex, follow"]]
diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn
index 41aa58151..ccd7f7eaa 100644
--- a/doc/ikiwiki/pagespec/sorting.mdwn
+++ b/doc/ikiwiki/pagespec/sorting.mdwn
@@ -4,8 +4,23 @@ specifying the order that matching pages are shown in. The following sort
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.
-* `title_natural` - Only available if [[!cpan Sort::Naturally]] is
- installed. Orders by title, but numbers in the title are treated
+
+* `title` - Order by title (page name).
+[[!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" 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.
+"""]]
+
+In addition, you can combine several sort orders and/or reverse the order of
+sorting, with a string like `age -title` (which would sort by age, then by
+title in reverse order if two pages have the same age).
+
+[[!meta robots="noindex, follow"]]