Skip to content

Latest commit

 

History

History
85 lines (77 loc) · 5.31 KB

shortcuts.mdwn

File metadata and controls

85 lines (77 loc) · 5.31 KB

[[!if test="enabled(shortcut)" then="This wiki has shortcuts enabled." else="This wiki has shortcuts disabled."]]

Some examples of using shortcuts include:

\[[!google foo]]
\[[!wikipedia War_of_1812]]
\[[!debbug 12345]]
Check the \[[!google ikiwiki desc="google search for %s"]].

This page controls what shortcut links the wiki supports.

To add a new shortcut, use the shortcut [[ikiwiki/directive]]. In the url, "%s" is replaced with the text passed to the named shortcut, after [[!wikipedia url_encoding]] it, and '%S' is replaced with the raw, non-encoded text. Additionally, %W is replaced with the text encoded just right for Wikipedia. The optional desc parameter controls the description of the link.

Remember that the name you give the shortcut will become a new [[ikiwiki/directive]]. Avoid using a name that conflicts 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 wiki, so that future versions of ikiwiki will include your shortcut in the standard underlay.