X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/10a2895b3b2814636050176948253d1ca9067217..19a7752021249eb8984e523fd6ed5a3730dc9be7:/IkiWiki/Plugin/shortcut.pm diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm index 0e7769c67..fb096ecbd 100644 --- a/IkiWiki/Plugin/shortcut.pm +++ b/IkiWiki/Plugin/shortcut.pm @@ -13,8 +13,11 @@ sub import { #{{{ sub checkconfig () { #{{{ # Preprocess the shortcuts page to get all the available shortcuts # defined before other pages are rendered. - IkiWiki::preprocess("shortcuts", "shortcuts", - readfile(srcfile("shortcuts.mdwn"))); + my $srcfile=eval {srcfile("shortcuts.mdwn")}; + if (! defined $srcfile) { + error(gettext("shortcut plugin will not work without a shortcuts.mdwn")); + } + IkiWiki::preprocess("shortcuts", "shortcuts", readfile($srcfile)); } # }}} sub preprocess_shortcut (@) { #{{{