]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/shortcuts.mdwn
9e1a6e7ac628819720352af4209d61877deaa094
[ikiwiki.git] / doc / plugins / contrib / shortcuts.mdwn
1 [[template id=plugin name=shortcuts included=0 author="[[VictorMoral]]"]]
2 [[tag type/format]]
3 [[meta title="shortcuts (third-party plugin)"]]
4
5 Note: This plugin is different than the "shortcut" plugin now included in
6 ikiwiki. I'm leaving it here in case people prefer how this one works.
7 --[[Joey]]
8
9 *shortcuts* is a plugin for make external links easy in a ikiwiki page.
10 It filter the raw source code, searching *wafl expresions* and replacing it
11 for ikiwiki links and not for html links. 
12
13 *Note: my apologies for my poor english, my mother language is the spanish.
14 Any corrections are welcome :-).*
15
16 In the source page you need include the expresions as:
17
18     For my {wiki:UPS} APC i need the {deb:apcupsd} package installed. You can 
19     found {google:apc linux|many positive responses}.
20
21 and after filter this is the result:
22
23     For my [UPS](http://en.wikipedia.org/wiki/UPS) i need the 
24     [apcupsd](http://packages.debian.org/). You can found 
25     [many positive responses](http://www.google.com/search?q=apc+linux).
26
27 If you need escape a walf expression prefix with a backslash character as in:
28
29     This is a \{cpan:example}.
30
31 This module is inspired in Kwiki::Shortcuts with minor diferences. The wafl
32 expresions are strings between braces with the following elements:
33
34 * one name (followed by one colon character)
35 * one o many search terms
36 * an optional text for the link
37
38 The plugin provides some predefined shortcuts, and it can use a external
39 definitions file. This file is named *shortcuts.conf* by default, but it can
40 be set with the *shortcuts* parameter and configuration variable.
41
42 The next shortcuts are predefined:
43
44 -   google: http://www.google.com/search?q=
45 -   deb:    http://packages.debian.org/
46 -   dbug:   http://bugs.debian.org/
47 -   cpan:   http://search.cpan.org/search?mode=dist&query=
48 -   wiki:   http://en.wikipedia.org/wiki/
49
50 Use the external Perl module: URI::Escape and it can be found
51 [here](http://taquiones.net/files/misc/IkiWiki-Plugin-shortcuts-0.3.tar.gz).
52