add variable value examples
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Feb 2010 19:48:22 +0000 (14:48 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Feb 2010 19:48:22 +0000 (14:48 -0500)
doc/plugins/write.mdwn

index 07bfd72ac218b32b777d56157e6719a545c0f5fd..f2b96b6d96eb214f24fda961fec826639e2ef17a 100644 (file)
@@ -3,7 +3,7 @@ written to extend ikiwiki in many ways. Despite the length of this page,
 it's not really hard. This page is a complete reference to everything a
 plugin might want to do. There is also a quick [[tutorial]].
 
-[[!template type="note" text="""
+[[!template id="note" text="""
 Ikiwiki is a compiler
 
 One thing to keep in mind when writing a plugin is that ikiwiki is a wiki
@@ -569,6 +569,8 @@ The `%links` hash can be used to look up the names of each page that
 a page links to. The name of the page is the key; the value is an array
 reference. Do not modify this hash directly; call `add_link()`.
 
+       $links{"foo"} = ["bar", "baz"];
+
 ### %destsources
 
 The `%destsources` hash records the name of the source file used to
@@ -576,6 +578,8 @@ create each destination file. The key is the output filename (ie,
 "foo/index.html"), and the value is the source filename that it was built
 from (eg, "foo.mdwn"). Note that a single source file may create multiple
 destination files. Do not modify this hash directly; call `will_render()`.
+       
+       $destsources{"foo/index.html"} = "foo.mdwn";
 
 ### %pagesources
 
@@ -583,6 +587,8 @@ The `%pagesources` has can be used to look up the source filename
 of a page. So the key is the page name, and the value is the source
 filename. Do not modify this hash.
 
+       $pagesources{"foo"} = "foo.mdwn";
+
 ## Library functions
 
 ### `hook(@)`