From: Javier Rojas Date: Mon, 4 Oct 2010 18:20:09 +0000 (-0400) Subject: Added Javier Rojas' linktoimgonly.pm plugin. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=01616e64b2d8de8d05bbe8d05ca401c1a8a83dc3;p=ikiwiki.git Added Javier Rojas' linktoimgonly.pm plugin. From http://devnull.li/~jerojasro/files/linktoimgonly.pm --- diff --git a/IkiWiki/Plugin/linktoimgonly.pm b/IkiWiki/Plugin/linktoimgonly.pm new file mode 100644 index 000000000..02dcb4a68 --- /dev/null +++ b/IkiWiki/Plugin/linktoimgonly.pm @@ -0,0 +1,18 @@ +#!/usr/bin/perl + +package IkiWiki::Plugin::linktoimgonly; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "preprocess", id => "ltio", call => \&preprocess); +} + +sub preprocess { + my %params = @_; + return "" . $params{"text"} . ""; +} + +1