* Improve markdown loading. First, try to load it as a properl perl module,
in case it was installed as one. Then fall back to trying /usr/bin/markdown. * Document in install page how to install markdown, since it has no installation procedure in the upstream tarball.master
parent
3ed1116c11
commit
cade16fbb6
|
@ -10,16 +10,24 @@ sub import { #{{{
|
|||
IkiWiki::hook(type => "htmlize", id => "mdwn", call => \&htmlize);
|
||||
} # }}}
|
||||
|
||||
my $markdown_loaded=0;
|
||||
sub htmlize ($) { #{{{
|
||||
my $content = shift;
|
||||
|
||||
if (! $INC{"/usr/bin/markdown"}) {
|
||||
# Note: a proper perl module is available in Debian
|
||||
if (! $markdown_loaded) {
|
||||
# Note: This hack to make markdown run as a proper perl
|
||||
# module. A proper perl module is available in Debian
|
||||
# for markdown, but not upstream yet.
|
||||
no warnings 'once';
|
||||
$blosxom::version="is a proper perl module too much to ask?";
|
||||
use warnings 'all';
|
||||
do "/usr/bin/markdown" || IkiWiki::error("failed to load /usr/bin/markdown: $!");
|
||||
|
||||
eval q{use Markdown};
|
||||
if ($@) {
|
||||
do "/usr/bin/markdown" ||
|
||||
IkiWiki::error("failed to load Markdown.pm perl module ($@) or /usr/bin/markdown ($!)");
|
||||
}
|
||||
$markdown_loaded=1;
|
||||
require Encode;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,9 +9,13 @@ ikiwiki (1.17) UNRELEASED; urgency=low
|
|||
* Remove <br> from end of aggregate preprocessor directive output.
|
||||
* Ship ikiwiki executable as ikiwiki.pl in source to avoid issues on
|
||||
case-sensative filesystems like OSX.
|
||||
* Display an error message if /usr/bin/markdown can't be loaded.
|
||||
* Improve markdown loading. First, try to load it as a properl perl module,
|
||||
in case it was installed as one. Then fall back to trying
|
||||
/usr/bin/markdown.
|
||||
* Document in install page how to install markdown, since it has no
|
||||
installation procedure in the upstream tarball.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 9 Aug 2006 23:01:02 -0400
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 9 Aug 2006 23:50:25 -0400
|
||||
|
||||
ikiwiki (1.16) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@ installed, and also uses the following perl modules if available:
|
|||
`HTML::Template` `Mail::SendMail` `Time::Duration` `Date::Parse`,
|
||||
`HTML::Scrubber`, `RPC::XML`, `XML::Simple`, `XML::Feed`
|
||||
|
||||
If you're installing MarkDown by hand, note that it should be installed as
|
||||
`Markdown.pm` somewhere in perl's module search path, or alternately as
|
||||
`/usr/bin/markdown`. Ikiwiki will find it under either name.
|
||||
|
||||
If you want to install from the tarball, you should make sure that the
|
||||
required perl modules are installed, then run:
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
in order to install Markdown, I had to copy the Markdown.pl file to /usr/bin/markdown
|
|
@ -1,5 +1,5 @@
|
|||
This plugin generates a list of possibly orphaned pages -- pages that no other page
|
||||
links to.
|
||||
This plugin generates a list of possibly orphaned pages -- pages that no
|
||||
other page links to.
|
||||
|
||||
The optional parameter "pages" can be a [[PageSpec]] specifying the pages
|
||||
to check for orphans, default is search them all.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Look ma, this page uses '''wiki''' markup, not MarkDown! :-)
|
||||
Look ma, this page uses '''wiki''' markup, not MarkDown! :-)
|
||||
|
|
Loading…
Reference in New Issue