diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-02-12 14:48:22 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-02-12 14:48:22 -0500 |
commit | 60410369daef9ce990d516f0d538571db4623ceb (patch) | |
tree | 5512328d4785968d839c41861a5e8e06b435b097 /doc/plugins/write.mdwn | |
parent | ba19f940bd071f7065246594751dd49041cbbaba (diff) | |
download | ikiwiki-60410369daef9ce990d516f0d538571db4623ceb.tar ikiwiki-60410369daef9ce990d516f0d538571db4623ceb.tar.gz |
add variable value examples
Diffstat (limited to 'doc/plugins/write.mdwn')
-rw-r--r-- | doc/plugins/write.mdwn | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 07bfd72ac..f2b96b6d9 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -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(@)` |