called during the preliminary scan that ikiwiki makes of updated pages,
before begining to render pages. This parameter should be set to true if
the hook modifies data in `%links`. Note that doing so will make the hook
-be run twice per page build, so avoid doing it for expensive hooks.
+be run twice per page build, so avoid doing it for expensive hooks. (As an
+optimisation, if your preprocessor hook is called in a void contets, you
+can assume it's being run in scan mode.)
Note that if the [[htmlscrubber]] is enabled, html in
[[ikiwiki/PreProcessorDirective]] output is sanitised, which may limit what
bypass it). When a page is edited, each registered canedit hook is called
in turn, and passed the page name, a CGI object, and a session object.
-If edit can proceed, the hook should return "". If the edit is not allowed
-by this hook, the hook should return an error message for the user to see.
If the hook has no opinion about whether the edit can proceed, return
-`undef`, and the next plugin will be asked to decide.
+`undef`, and the next plugin will be asked to decide. If edit can proceed,
+the hook should return "". If the edit is not allowed by this hook, the
+hook should return an error message for the user to see, or a function
+that can be run to log the user in or perform other action necessary for
+them to be able to edit the page.
+
+This hook should avoid directly redirecting the user to a signin page,
+since it's sometimes used to test to see which pages in a set of pages a
+user can edit.
### editcontent
When pages are deleted, ikiwiki automatically deletes their pagestate too.
+Note that page state does not persist across wiki rebuilds, only across
+wiki updates.
+
### Other variables
If your plugin needs to access data about other pages in the wiki. It can