From 79b376f9912891a8748fcbb4580969e4dbf7fc75 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 Oct 2008 20:28:18 -0400 Subject: Add an underlay for javascript, and add ikiwiki.js containing some utility code. * Add an underlay for javascript, and add ikiwiki.js containing some utility code. * toggle: Stop embedding the full toggle code on each page using it, and move it to toggle.js in the javascript underlay. --- doc/plugins/write.mdwn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1b78f5900..daf70c8e2 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -847,3 +847,32 @@ to a hash containing all the config items. They should also implement a By the way, to parse a ikiwiki setup file and populate `%config`, a program just needs to do something like: `use IkiWiki::Setup; IkiWiki::Setup::load($filename)` + +### Javascript + +Some plugins use javascript to make ikiwiki look a bit more web-2.0-ish. + +All javascript code should be put in `.js` files in the `javascript` +underlay, and plugins using those files can enable use of the underlay by +calling `add_underlay("javascript");` in their `import` function. + +You'll have to arrange for `