summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/brokenlinks.mdwn2
-rw-r--r--doc/plugins/orphans.mdwn3
-rw-r--r--doc/plugins/pagecount.mdwn4
-rw-r--r--doc/plugins/recentchanges.mdwn26
-rw-r--r--doc/plugins/recentchanges/discussion.mdwn17
-rw-r--r--doc/plugins/write.mdwn39
6 files changed, 82 insertions, 9 deletions
diff --git a/doc/plugins/brokenlinks.mdwn b/doc/plugins/brokenlinks.mdwn
index 23fa04d7c..208d7120b 100644
--- a/doc/plugins/brokenlinks.mdwn
+++ b/doc/plugins/brokenlinks.mdwn
@@ -10,4 +10,4 @@ pages to search for broken links, default is search them all.
If this plugin is turned on, here's a list of broken links on this wiki:
-[[brokenlinks ]]
+[[brokenlinks pages="* and !recentchanges"]]
diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn
index 798a5c8c2..74f4bae08 100644
--- a/doc/plugins/orphans.mdwn
+++ b/doc/plugins/orphans.mdwn
@@ -15,5 +15,6 @@ orphans.
Here's a list of orphaned pages on this wiki:
[[orphans pages="* and !news/* and !todo/* and !bugs/* and !users/* and
-!examples/* and !tips/* and !sandbox/* and !wikiicons/* and !plugins/*"]]
+!recentchanges and !examples/* and !tips/* and !sandbox/* and
+!wikiicons/* and !plugins/*"]]
"""]]
diff --git a/doc/plugins/pagecount.mdwn b/doc/plugins/pagecount.mdwn
index 9a9768277..8f7029df8 100644
--- a/doc/plugins/pagecount.mdwn
+++ b/doc/plugins/pagecount.mdwn
@@ -10,5 +10,5 @@ pages to count, default is to count them all.
This plugin is included in ikiwiki, but is not enabled by default.
If it is turned on it can tell us that this wiki includes
-[[pagecount ]] pages, of which [[pagecount pages="*/Discussion"]] are
-discussion pages.
+[[pagecount pages="* and !recentchanges"]]
+pages, of which [[pagecount pages="*/Discussion"]] are discussion pages.
diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn
new file mode 100644
index 000000000..b48dcbacf
--- /dev/null
+++ b/doc/plugins/recentchanges.mdwn
@@ -0,0 +1,26 @@
+[[template id=plugin name=recentchanges core=1 author="[[Joey]]"]]
+
+This plugin examines the [[revision_control_system|rcs]] history and
+generates a page describing each recent change made to the wiki. These
+pages can be joined together with [[inline]] to generate the
+[[RecentChanges]] page.
+
+Typically only the RecentChanges page will use the pages generated by this
+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/recentchanges/discussion.mdwn b/doc/plugins/recentchanges/discussion.mdwn
new file mode 100644
index 000000000..a16cb5217
--- /dev/null
+++ b/doc/plugins/recentchanges/discussion.mdwn
@@ -0,0 +1,17 @@
+Thanks for that one, again, it's great!
+
+One minor thing I noticed, seen on <http://www.bddebian.com/~wiki/recent_changes/>:
+The links to user pages of e.g. *MichaelBanck* or *GianlucaGuida* don't work, as they're
+being linked to <http://www.bddebian.com/~wiki/user/MichaelBanck>, whereas it should be
+<http://www.bddebian.com/~wiki/user/michaelbanck>.
+
+> I've fixed this.. --[[Joey]]
+
+Another one. If you change the *recentchangespage* configuration option, (it seems to me)
+that the pages from the old hierarchy will not be removed from the disk. But then, changing
+this should be a rather uncommon thing.
+
+--[[tschwinge]]
+
+> And fixed this, by making it look at all *._change pages, not just
+> those in a specific directory, when deciding which to expire. --[[Joey]]
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 0da425402..e1e057c00 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -82,11 +82,19 @@ configuration. It's called early in the startup process. The
function is passed no values. It's ok for the function to call
`error()` if something isn't configured right.
+### refresh
+
+ hook(type => "refresh", id => "foo", call => \&refresh);
+
+This hook is called just before ikiwiki scans the wiki for changed files.
+It's useful for plugins that need to create or modify a source page. The
+function is passed no values.
+
### needsbuild
hook(type => "needsbuild", id => "foo", call => \&needsbuild);
-This allows a plugin the manipulate the list of files that need to be
+This allows a plugin to manipulate the list of files that need to be
built when the wiki is refreshed. The function is passed a reference to an
array of pages that will be rebuilt, and can modify the array, either
adding or removing files from it.
@@ -214,8 +222,11 @@ source files that were rendered.
Use this to hook into ikiwiki's cgi script. Each registered cgi hook is
called in turn, and passed a CGI object. The hook should examine the
-parameters, and if it will handle this CGI request, output a page (including the http headers) and
-terminate the program.
+parameters, and if it will handle this CGI request, output a page
+(including the http headers) and terminate the program.
+
+Note that cgi hooks are called as early as possible, before any ikiwiki
+state is loaded, and with no session information.
### auth
@@ -470,8 +481,13 @@ If the destination directory doesn't exist, it will first be created.
Given a page name and a destination file name (not including the base
destination directory), register that the page will result in that file
-being rendered. It's important to call this before writing to any file in
-the destination directory.
+being rendered.
+
+It's important to call this before writing to any file in the destination
+directory, and it's important to call it consistently every time, even if
+the file isn't really written this time -- unless you delete any old
+version of the file. In particular, in preview mode, this should still be
+called even if the file isn't going to be written to during the preview.
Ikiwiki uses this information to automatically clean up rendered files when
the page that rendered them goes away or is changes to no longer render
@@ -523,6 +539,19 @@ destination file, as registered by `will_render`.
Passed a page and an extension, returns the filename that page will be
rendered to.
+## Internal use pages
+
+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,
+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
ikiwiki's support for [[revision_control_systems|rcs]] also uses pluggable