summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-12 13:02:58 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-12 13:04:20 -0500
commit46819b530bca5a3adf00278500a34363a94c1fb2 (patch)
tree8b93662fac45d9ce771939b3aa7df2643dd9df87 /doc/plugins
parent40cb4aa5c022eb019670ef814da2c583d9be9d1f (diff)
shortcut: If default_pageext is set, first look for shortcuts.default_pageext
Falls back to looking for shortcuts.mdwn for backwards compatabiity; there probably exist wikis that have changed the pageext but still use shortcuts.mdwn.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/mdwn/discussion.mdwn4
-rw-r--r--doc/plugins/shortcut/discussion.mdwn21
2 files changed, 3 insertions, 22 deletions
diff --git a/doc/plugins/mdwn/discussion.mdwn b/doc/plugins/mdwn/discussion.mdwn
index 9ebf99b7e..4b05e7f4e 100644
--- a/doc/plugins/mdwn/discussion.mdwn
+++ b/doc/plugins/mdwn/discussion.mdwn
@@ -5,7 +5,3 @@ you need to overwrite the underlay
dir (set underlaydir in ikiwiki.setup
to your own underlay dir or replace underlay pages
in your $SRC).
-
-Specially, the [[shortcut]] plugin is hardcoded to
-use shortcuts.mdwn. So you need pay more care if
-you [[use shortcut without mdwn|shortcut/discussion]].
diff --git a/doc/plugins/shortcut/discussion.mdwn b/doc/plugins/shortcut/discussion.mdwn
index 770c95836..4e11ce08c 100644
--- a/doc/plugins/shortcut/discussion.mdwn
+++ b/doc/plugins/shortcut/discussion.mdwn
@@ -3,25 +3,10 @@ disabled [[mdwn]], to get [[shortcut]] work, you need
commit in a shortcuts.ext (ext is `rcs|creole|html|txt|etc`),
and edit/patch [[shortcut]].
-Maybe use the $default_pageext is better than hardcode .mdwn?
-
-<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>
+Maybe use the `default_pageext` is better than hardcode .mdwn?
--[[weakish]]
+> done, it will use `default_pageext` now --[[Joey]]
+