projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
066cabd
)
Added Javier Rojas' linktoimgonly.pm plugin.
author
Javier Rojas
<jerojasro@devnull.li>
Mon, 4 Oct 2010 18:20:09 +0000
(14:20 -0400)
committer
W. Trevor King
<wking@tremily.us>
Sun, 13 Jan 2013 12:08:52 +0000
(07:08 -0500)
From
http://devnull.li/~jerojasro/files/linktoimgonly.pm
IkiWiki/Plugin/linktoimgonly.pm
[new file with mode: 0644]
patch
|
blob
diff --git a/IkiWiki/Plugin/linktoimgonly.pm
b/IkiWiki/Plugin/linktoimgonly.pm
new file mode 100644
(file)
index 0000000..
02dcb4a
--- /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 "<a href='" . bestlink($params{"page"}, $params{"img"}) . "'>" . $params{"text"} . "</a>";
+}
+
+1