summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhttp://weakish.int.eu.org/ <http://weakish.int.eu.org/@web>2009-02-12 05:54:20 -0500
committerJoey Hess <joey@kitenet.net>2009-02-12 05:54:20 -0500
commitaa88d6beeff168b2bd56f90646dede7c89acc4ea (patch)
treeac731151c30ad4186fa27cae44198d4c94f6e603 /doc
parent978a3570dbec85376fc44a3e564079664f5c26e5 (diff)
patch for shortcut.pm to use $default_pageext instead of hardcode .mdwn.
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins/shortcut/discussion.mdwn31
1 files changed, 21 insertions, 10 deletions
diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn
index 8fa3f7acf..770c95836 100644
--- a/doc/plugins/shortcut/discussion.mdwn
+++ b/doc/plugins/shortcut/discussion.mdwn
@@ -1,16 +1,27 @@
-The plugin somehow depends on [[mdwn]]. If you have
+The plugin depends on [[mdwn]]. If you have
disabled [[mdwn]], to get [[shortcut]] work, you need
-commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`).
+commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`),
+and edit/patch [[shortcut]].
-Then edit the following lines in [[shortcut]] plugin source:
+Maybe use the $default_pageext is better than hardcode .mdwn?
- my $srcfile=srcfile("shortcuts.mdwn", 1);
+<pre>
+--- shortcut.pm.orig 2009-02-12 02:05:22.000000000 -0600
++++ shortcut.pm 2009-02-12 04:41:30.000000000 -0600
+@@ -23,9 +23,9 @@
+ if (defined $config{srcdir}) {
+ # Preprocess the shortcuts page to get all the available shortcuts
+ # defined before other pages are rendered.
+- my $srcfile=srcfile("shortcuts.mdwn", 1);
++ my $srcfile=srcfile("shortcuts.$config{default_pageext}", 1);
+ if (! defined $srcfile) {
+- error(gettext("shortcut plugin will not work without a shortcuts.mdwn"));
++ error(gettext("shortcut plugin will not work without a shortcuts.$config{default_pageext}"));
+ }
+ IkiWiki::preprocess("shortcuts", "shortcuts", readfile($srcfile));
+ }
+</pre>
-and
+--[[weakish]]
- error(gettext("shortcut plugin will not work without a shortcuts.mdwn"));
-
-(It is better to edit a local copy of shortcut.pm in, say, ~/.ikiwiki/IkiWiki/Plugin
-and add ~/.ikiwiki to libdir in your ikiwiki.setup than edit the shortcut.pm installed
-in system directly.)