patch for shortcut.pm to use $default_pageext instead of hardcode .mdwn.
[ikiwiki.git] / doc / plugins / shortcut / discussion.mdwn
1 The plugin depends on [[mdwn]].  If you have
2 disabled [[mdwn]], to get [[shortcut]] work, you need
3 commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`),
4 and edit/patch [[shortcut]].
5
6 Maybe use the $default_pageext is better than hardcode .mdwn?
7
8 <pre>
9 --- shortcut.pm.orig    2009-02-12 02:05:22.000000000 -0600
10 +++ shortcut.pm 2009-02-12 04:41:30.000000000 -0600
11 @@ -23,9 +23,9 @@
12         if (defined $config{srcdir}) {
13                 # Preprocess the shortcuts page to get all the available shortcuts
14                 # defined before other pages are rendered.
15 -               my $srcfile=srcfile("shortcuts.mdwn", 1);
16 +               my $srcfile=srcfile("shortcuts.$config{default_pageext}", 1);
17                 if (! defined $srcfile) {
18 -                       error(gettext("shortcut plugin will not work without a shortcuts.mdwn"));
19 +                       error(gettext("shortcut plugin will not work without a shortcuts.$config{default_pageext}"));
20                 }
21                 IkiWiki::preprocess("shortcuts", "shortcuts", readfile($srcfile));
22         }
23 </pre>
24
25 --[[weakish]]
26
27