]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
[Name](name)-style links don't seem to be supported
[ikiwiki.git] / doc / plugins / write.mdwn
index 48a94ec8b131a737769a4baaf7f947c4838ac56d..b9601ea57828dd16299ff3a5e7c767500f5c5c0c 100644 (file)
@@ -192,6 +192,7 @@ return the htmlized content.
 
        hook(type => "pagetemplate", id => "foo", call => \&pagetemplate);
 
 
        hook(type => "pagetemplate", id => "foo", call => \&pagetemplate);
 
+
 [[Templates|wikitemplates]] are filled out for many different things in
 ikiwiki, like generating a page, or part of a blog page, or an rss feed, or
 a cgi. This hook allows modifying the variables available on those
 [[Templates|wikitemplates]] are filled out for many different things in
 ikiwiki, like generating a page, or part of a blog page, or an rss feed, or
 a cgi. This hook allows modifying the variables available on those
@@ -356,7 +357,7 @@ This hook is called whenever ikiwiki normally saves its state, just before
 the state is saved. The function can save other state, modify values before
 they're saved, etc.
 
 the state is saved. The function can save other state, modify values before
 they're saved, etc.
 
-## renamepage
+### renamepage
 
        hook(type => "renamepage", id => "foo", call => \&renamepage);
 
 
        hook(type => "renamepage", id => "foo", call => \&renamepage);
 
@@ -379,22 +380,29 @@ die if not, which will cause the plugin to not be offered in the configuration
 interface.
 
 The data returned is a list of `%config` options, followed by a hash
 interface.
 
 The data returned is a list of `%config` options, followed by a hash
-describing the option. For example:
+describing the option. There can also be an item named "plugin", which
+describes the plugin as a whole. For example:
 
                 return
                        option_foo => {
                                type => "boolean",
 
                 return
                        option_foo => {
                                type => "boolean",
-                               description => "enable foo",
+                               description => "enable foo?",
+                               advanced => 1,
                                safe => 1,
                                rebuild => 1,
                        },
                        option_bar => {
                                type => "string",
                                example => "hello",
                                safe => 1,
                                rebuild => 1,
                        },
                        option_bar => {
                                type => "string",
                                example => "hello",
-                               description => "what to say",
+                               description => "option bar",
                                safe => 1,
                                rebuild => 0,
                        },
                                safe => 1,
                                rebuild => 0,
                        },
+                       plugin => {
+                               description => "description of this plugin",
+                               safe => 1,
+                               rebuild => 1,
+                       },
 
 * `type` can be "boolean", "string", "integer", "pagespec",
   or "internal" (used for values that are not user-visible). The type is
 
 * `type` can be "boolean", "string", "integer", "pagespec",
   or "internal" (used for values that are not user-visible). The type is
@@ -404,10 +412,17 @@ describing the option. For example:
 * `description` is a short description of the option.
 * `link` is a link to further information about the option. This can either
   be a wikilink, or an url.
 * `description` is a short description of the option.
 * `link` is a link to further information about the option. This can either
   be a wikilink, or an url.
+* `advanced` can be set to true if the option is more suitable for advanced
+  users.
 * `safe` should be false if the option should not be displayed in unsafe
   configuration methods, such as the web interface. Anything that specifies
   a command to run, a path on disk, or a regexp should be marked as unsafe.
 * `safe` should be false if the option should not be displayed in unsafe
   configuration methods, such as the web interface. Anything that specifies
   a command to run, a path on disk, or a regexp should be marked as unsafe.
-* `rebuild` should be true if changing the option will require a wiki rebuild.
+  If a plugin is marked as unsafe, that prevents it from being
+  enabled/disabled.
+* `rebuild` should be true if changing the option (or enabling/disabling
+  the plugin) will require a wiki rebuild, false if no rebuild is needed,
+  and undef if a rebuild could be needed in some circumstances, but is not
+  strictly required.
 
 ## Plugin interface
 
 
 ## Plugin interface