aboutsummaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-06 22:50:19 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-06 22:50:19 -0400
commitf6fd7639daadea87530897ffd4882c970413822d (patch)
tree5e84c31becabac8093401beb22d2d26ca92e0f78 /doc/plugins
parent899639f10d49cff410059c3af2e1d5717c25b738 (diff)
parentb8f4ffdc5d381da04000502f20f0d4e4c13704b3 (diff)
downloadikiwiki-f6fd7639daadea87530897ffd4882c970413822d.tar
ikiwiki-f6fd7639daadea87530897ffd4882c970413822d.tar.gz
Merge remote branch 'smcv/ready/link-types'
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/write.mdwn21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 96a2aa16d..fe7cf0183 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -633,6 +633,22 @@ reference. Do not modify this hash directly; call `add_link()`.
$links{"foo"} = ["bar", "baz"];
+### `%typedlinks`
+
+The `%typedlinks` hash records links of specific types. Do not modify this
+hash directly; call `add_link()`. The keys are page names, and the values
+are hash references. In each page's hash reference, the keys are link types
+defined by plugins, and the values are hash references with link targets
+as keys, and 1 as a dummy value, something like this:
+
+ $typedlinks{"foo"} = {
+ tag => { short_word => 1, metasyntactic_variable => 1 },
+ next_page => { bar => 1 },
+ };
+
+Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in
+`%typedlinks`.
+
### `%pagesources`
The `%pagesources` has can be used to look up the source filename
@@ -939,11 +955,14 @@ Optionally, a third parameter can be passed, to specify the preferred
filename of the page. For example, `targetpage("foo", "rss", "feed")`
will yield something like `foo/feed.rss`.
-### `add_link($$)`
+### `add_link($$;$)`
This adds a link to `%links`, ensuring that duplicate links are not
added. Pass it the page that contains the link, and the link text.
+An optional third parameter sets the link type (`undef` produces an ordinary
+[[ikiwiki/WikiLink]]).
+
## Miscellaneous
### Internal use pages