diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/shortcuts.mdwn | 4 | ||||
-rw-r--r-- | doc/todo/shortcut_with_different_link_text.mdwn | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn index e4e740897..8c0700165 100644 --- a/doc/shortcuts.mdwn +++ b/doc/shortcuts.mdwn @@ -7,6 +7,7 @@ Some examples of using shortcuts include: \[[!google foo]] \[[!wikipedia War_of_1812]] \[[!debbug 12345]] + Check the \[[!cia ikiwiki desc="CIA page for %s"]]. This page controls what shortcut links the wiki supports. @@ -62,7 +63,8 @@ controls the description of the link. Remember that the `name` you give the shortcut will become a new [[ikiwiki/PreprocessorDirective]]. Avoid using a `name` that conflicts -with an existing directive. +with an existing directive. These directives also accept a `desc` +parameter that will override the one provided at definition time. If you come up with a shortcut that you think others might find useful, consider contributing it to the [shortcuts page on the ikiwiki diff --git a/doc/todo/shortcut_with_different_link_text.mdwn b/doc/todo/shortcut_with_different_link_text.mdwn index 07e999642..93f9651a4 100644 --- a/doc/todo/shortcut_with_different_link_text.mdwn +++ b/doc/todo/shortcut_with_different_link_text.mdwn @@ -57,5 +57,11 @@ So that the 'l' plugin inserts the location the page there, and markdown does th For external links, that is no concern, however. So you could define for each shortcut an alternative directive, that inserts the URL. Perhaps `\[[url shortcutname params]]` or `\[[@shortcutname params]]` (if the preprocessor supported the @), and this could be extended to local links in an obvious manner: `\[[url page]]` or `\[[@page]]`. Now, if you could just get rid off the parantheses for markdown, for the short inline links --[[tuomov]] (who'd really rather not have two separate linking mechanisms: ikiwiki's heavy syntax and markdown's lighter one). +--- + +I've added code to make the \[[foo 123]] syntax accept a _desc_ +parameter. I've named it like this to signal that it overrides the +_desc_ provided at description time. `%s` is expanded here as well. +[[todo/done]] -- Adeodato Simó |