]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn
(no commit message)
[git.ikiwiki.info.git] / doc / forum / How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn
1 How to allow .markdown and .md (at the same time) as valid extensions for source files? The default is .mdwn.
3 > Add `md` to your `add_plugins`, set `libdir` if not already set,
4 > put the following in `${libdir}/IkiWiki/Plugin/md.pm`, and rebuild:
6     #!/usr/bin/perl
7     package IkiWiki::Plugin::md;
8     
9     use warnings;
10     use strict;
11     use IkiWiki 3.00;
12     
13     my @ADDITIONAL_EXTENSIONS = qw(md markdown);
14     
15     sub import {
16         IkiWiki::loadplugin('mdwn');
17         foreach my $ext (@ADDITIONAL_EXTENSIONS) {
18             hook(type => "htmlize", id => $ext, call => \&IkiWiki::Plugin::mdwn::htmlize, longname => "Markdown (.$ext)");
19         }
20     }
21     
22     1
24 > --[[schmonz]]