diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-07-21 12:31:57 +0100 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-07-21 12:31:57 +0100 |
commit | 297ff849b93e5a75074e321fe65500f0e091601c (patch) | |
tree | 516057b289dd47dbb9c5b48c17fee8e4dfdafa40 /doc/plugins/write | |
parent | dd87d82fbe2bf09abe634caef044474d5b24502e (diff) |
Migrate doc/plugins via prefix_directives
This is a partial commit of:
egrep -rl '\[\[[a-z]+ ' doc | xargs --max-args 1 ./ikiwiki-transition
prefix_directives
Diffstat (limited to 'doc/plugins/write')
-rw-r--r-- | doc/plugins/write/external.mdwn | 4 | ||||
-rw-r--r-- | doc/plugins/write/tutorial.mdwn | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/plugins/write/external.mdwn b/doc/plugins/write/external.mdwn index 47834567a..cbcd9bf19 100644 --- a/doc/plugins/write/external.mdwn +++ b/doc/plugins/write/external.mdwn @@ -13,7 +13,7 @@ easier you can do the same thing in your favorite language. ;-) There's now a second external plugin, the [[rst]] plugin, written in python. It uses a `proxy.py`, a helper library for ikiwiki python plugins. -[[toc ]] +[[!toc ]] ## How external plugins use XML RPC @@ -85,7 +85,7 @@ language as part of their XML RPC interface. XML RPC has a limitation that it does not have a way to pass undef/NULL/None. There is an extension to the protocol that supports this, -but it is not yet available in the [[cpan XML::RPC]] library used by +but it is not yet available in the [[!cpan XML::RPC]] library used by ikiwiki. Until the extension is available, ikiwiki allows undef to be communicated diff --git a/doc/plugins/write/tutorial.mdwn b/doc/plugins/write/tutorial.mdwn index 94b72c763..cc2b33a57 100644 --- a/doc/plugins/write/tutorial.mdwn +++ b/doc/plugins/write/tutorial.mdwn @@ -5,7 +5,7 @@ What should the plugin do? Let's make it calculate and output the Fibonacci sequence. To output the next number in the sequence, all a user has to do is write this on a wiki page: - [[fib ]] + [[!fib ]] When the page is built, the [[ikiwiki/PreProcessorDirective]] will be replaced by the next number in the sequence. @@ -44,7 +44,7 @@ that "fib" has shown up again. It doesn't actually have to match the module name this time, but it generally will. This "fib" is telling ikiwiki what kind of PreprocessorDirective to handle, namely one that looks like this: - [[fib ]] + [[!fib ]] Notice the `\&preprocess`? This is how you pass a reference to a function, and the `preprocess` function is the one that ikiwiki will call to expand @@ -98,7 +98,7 @@ And let's change the `preprocess` sub to use it: Feel free to try it out with a simple page like this: - [[fib ]], [[fib ]], [[fib ]], [[fib ]], [[fib ]] + [[!fib ]], [[!fib ]], [[!fib ]], [[!fib ]], [[!fib ]] Looks like it works ok, doesn't it? That creates a page that lists: @@ -139,7 +139,7 @@ Ok, one more enhancement. Just incrementing the numbers is pretty boring. It would be nice to be able to jump directly to a given point in the sequence: - \[[fib seed=20]], [[fib ]], [[fib ]] + \[[fib seed=20]], [[!fib ]], [[!fib ]] Just insert these lines of code inside `preprocess`, in the appropriate spot: |