]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/write.mdwn
* Support htmlize plugins and make mdwn one such plugin, which is enabled by
[git.ikiwiki.info.git] / doc / plugins / write.mdwn
index b2b7c6ff806ec762aa035a0df89aa2e9d654bc25..5be90efdfb73be9a286ce234e0aad5e3fba367a2 100644 (file)
@@ -55,7 +55,8 @@ Note that if the [[htmlscrubber]] is enabled, html in
 [[PreProcessorDirective]] output is sanitised, which may limit what your
 plugin can do. Also, the rest of the page content is not in html format at
 preprocessor time. Text output by a preprocessor directive will be passed
-through markdown along with the rest of the page.
+through markdown (or whatever engine is used to htmlize the page) along
+with the rest of the page.
 
 # Other types of hooks
 
@@ -79,14 +80,14 @@ Runs on the raw source of a page, before anything else touches it, and can
 make arbitrary changes. The function is passed named parameters `page` and
 `content` and should return the filtered content.
 
-## sanitize
+## htmlize
 
-       IkiWiki::hook(type => "filter", id => "foo", call => \&sanitize);
+       IkiWiki::hook(type => "htmlize", id => "ext", call => \&filter);
 
-Use this to implement html sanitization or anything else that needs to
-modify the content of a page after it has been fully converted to html.
-The function is passed the page content and should return the sanitized
-content.
+Runs on the raw source of a page and turns it into html. The id parameter
+specifies the filename extension that a file must have to be htmlized using
+this plugin. This is how you can add support for new and exciting markup
+languages to ikiwiki.
 
 ## pagetemplate
 
@@ -99,6 +100,15 @@ be used to generate the page. It can manipulate that template, the most
 common thing to do is probably to call $template->param() to add a new
 custom parameter to the template.
 
+## sanitize
+
+       IkiWiki::hook(type => "sanitize", id => "foo", call => \&sanitize);
+
+Use this to implement html sanitization or anything else that needs to
+modify the content of a page after it has been fully converted to html.
+The function is passed the page content and should return the sanitized
+content.
+
 ## delete
 
        IkiWiki::hook(type => "delete", id => "foo", call => \&dele);