aboutsummaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-08 17:40:50 -0500
committerJoey Hess <joey@kitenet.net>2007-12-08 17:40:50 -0500
commit055179cb4cc9b8bc9b204e1a9f83b1f59e13824e (patch)
tree1a48f2f93684238180b355df67f2aa48dcfb1be4 /doc/todo
parent2fbca21390d2752a89a2e1167fe33d4d201359cf (diff)
downloadikiwiki-055179cb4cc9b8bc9b204e1a9f83b1f59e13824e.tar
ikiwiki-055179cb4cc9b8bc9b204e1a9f83b1f59e13824e.tar.gz
* Finally implemented a simple per-page data storage mechanism for plugins,
via the %pagestate hash. * Use pagestate in meta to detect potential redir loops.
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/plugin_data_storage.mdwn26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/todo/plugin_data_storage.mdwn b/doc/todo/plugin_data_storage.mdwn
index 7078a6ed3..21e925b5b 100644
--- a/doc/todo/plugin_data_storage.mdwn
+++ b/doc/todo/plugin_data_storage.mdwn
@@ -66,3 +66,29 @@ which pages have a calendar for the current time. Then ensure they are
rebuilt at least once a day. Currently, it needs a cron job to rebuild
the *whole* wiki every day; with this enhancement, the cron job would only
rebuild the few pages that really need it.
+
+
+---
+
+New design:
+
+`%Ikiwiki::state` is an exported hash that stores per-page state.
+Set with `$state{$page}{id}{key}=$value`. The `id` is the same `id` passed
+to `hook()`.
+
+This is stored in the index like:
+
+src=foo.mdwn dest=bar.mdwn id_key=value [...]
+
+The underscore ensures that there's no conflict with ikiwiki's own
+state variables. (Note that `id` and `key` need to be encoded here.)
+
+Plugins are reponsible for deleting old state info, though ikiwiki will
+handle deleting it if a page is removed.
+
+Ikiwiki needs to know when it can drop state for plugins that are no longer
+enabled. This is done via `hook()` -- if a plugin registers a hook
+ikiwiki knows it's still active, and preserves the state for the hook id.
+If not, that state will be dropped.
+
+[[done]]!! Now to use it..