summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-29 17:16:51 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-29 17:16:51 -0500
commit64a8c828b8cfa342118dd6e28b9dff43d83c6311 (patch)
tree64d413195168fe7f4616f01b9f832a66cf0096be /doc
parentfbfbda614dfeb01d1f7156f97125d17d99b4f113 (diff)
* meta: Add pagespec functions to match against title, author, authorurl,
license, and copyright. This can be used to create custom RecentChanges. * meta: To support the pagespec functions, metadata about pages has to be retained as pagestate. * Fix encoding bug when pagestate values contained spaces.
Diffstat (limited to 'doc')
-rw-r--r--doc/ikiwiki/pagespec.mdwn7
-rw-r--r--doc/plugins/recentchanges.mdwn14
-rw-r--r--doc/plugins/write.mdwn18
3 files changed, 27 insertions, 12 deletions
diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn
index e1a476202..3cd6bb9f4 100644
--- a/doc/ikiwiki/pagespec.mdwn
+++ b/doc/ikiwiki/pagespec.mdwn
@@ -33,10 +33,13 @@ functions:
was created
* "`created_before(page)`" - match only pages created before the given page
was created
-* "`glob(foo)`" - match pages that match the given glob `foo`. Just writing
+* "`glob(someglob)`" - match pages that match the given glob. Just writing
the glob by itself is actually a shorthand for this function.
-* "`internal(foo)`" - like `glob()`, but matches even internal-use
+* "`internal(glob)`" - like `glob()`, but matches even internal-use
pages that globs do not usually match.
+* "`title(glob)`", "`author(glob)`", "`authorurl(glob)`",
+ "`license(glob)`", "`copyright(glob)`" - match pages that have the given
+ metadata, matching the specified glob.
For example, to match all pages in a blog that link to the page about music
and were written in 2005:
diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn
index 8647985c9..b48dcbacf 100644
--- a/doc/plugins/recentchanges.mdwn
+++ b/doc/plugins/recentchanges.mdwn
@@ -10,3 +10,17 @@ plugin, but you can use it elsewhere too if you like. It's used like this:
\[[inline pages="internal(recentchanges/change_*)"
template=recentchanges show=0]]
+
+Here's an example of how to show only changes to "bugs/*".
+This matches against the title of the change, which includes a list of
+modified pages.
+
+ \[[inline pages="internal(recentchanges/change_*) and title(*bugs/*)"
+ template=recentchanges show=0]]
+
+Here's an example of how to show only changes that Joey didn't make.
+(Joey commits sometimes as user `joey`, and sometimes via openid.)
+
+ \[[inline pages="internal(recentchanges/change_*) and
+ !author(joey) and !author(http://joey.kitenet.net*)"
+ template=recentchanges show=0]]
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 79da6a612..9c3a36b8f 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -533,18 +533,16 @@ rendered to.
## Internal use pages
-Sometimes it's useful to put pages in the wiki without having them be
-rendered to individual html files. Such internal use pages are collected
-together to form the RecentChanges page, for example.
+Sometimes it's useful to put pages in the wiki without the overhead of
+having them be rendered to individual html files. Such internal use pages
+are collected together to form the RecentChanges page, for example.
To make an internal use page, register a filename extension that starts
-with "_". Internal use pages cannot be edited with the web interface, are
-not scanned for wikilinks (though wikilinks and preprocessor directives can
-appear on them, this is rarely a good idea and should be done with caution),
-and are not matched by regular PageSpecs glob patterns, but instead only by a
-special `internal()` [[ikiwiki/PageSpec]].
-
-Ikiwiki is optimised to handle lots of internal use pages, very quickly.
+with "_". Internal use pages cannot be edited with the web interface,
+generally shouldn't contain wikilinks or preprocessor directives (use
+either on them with extreme caution), and are not matched by regular
+PageSpecs glob patterns, but instead only by a special `internal()`
+[[ikiwiki/PageSpec]].
## RCS plugins