aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2015-03-07 14:36:09 -0600
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>2015-03-07 14:36:09 -0600
commit140500d06a26d7db543b5a267b19227d563d9cb7 (patch)
treea00107e356d9cd91513b49d334ec1f700e3992bc /doc
parent4a00cb7599c4a2efce877a67970da0cb94283e02 (diff)
downloadikiwiki-140500d06a26d7db543b5a267b19227d563d9cb7.tar
ikiwiki-140500d06a26d7db543b5a267b19227d563d9cb7.tar.gz
response
Diffstat (limited to 'doc')
-rw-r--r--doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn b/doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn
index d5f144957..79fbcfe67 100644
--- a/doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn
+++ b/doc/forum/How_to_allow_.markdown_and_.md_at_the_same_time_as_valid_extensions_for_source_files__63__.mdwn
@@ -1 +1,24 @@
How to allow .markdown and .md (at the same time) as valid extensions for source files? The default is .mdwn.
+
+> Add `md` to your `add_plugins`, set `libdir` if not already set,
+> put the following in `${libdir}/IkiWiki/Plugin/md.pm`, and rebuild:
+
+ #!/usr/bin/perl
+ package IkiWiki::Plugin::md;
+
+ use warnings;
+ use strict;
+ use IkiWiki 3.00;
+
+ my @ADDITIONAL_EXTENSIONS = qw(md markdown);
+
+ sub import {
+ IkiWiki::loadplugin('mdwn');
+ foreach my $ext (@ADDITIONAL_EXTENSIONS) {
+ hook(type => "htmlize", id => $ext, call => \&IkiWiki::Plugin::mdwn::htmlize, longname => "Markdown (.$ext)");
+ }
+ }
+
+ 1
+
+> --[[schmonz]]