From 09b0a3b73f7c9ca873c3e20a64b124c0749b3d3b Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 5 Aug 2007 20:48:13 +0000 Subject: * Add rel=tag attribute to tag links, supporting that microformat, as well as allowing them to be styled specially. Thanks, NicolasLimare. --- doc/todo/rel_attribute_for_links.mdwn | 37 +++-------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'doc/todo/rel_attribute_for_links.mdwn') diff --git a/doc/todo/rel_attribute_for_links.mdwn b/doc/todo/rel_attribute_for_links.mdwn index 7dc220afa..ced192758 100644 --- a/doc/todo/rel_attribute_for_links.mdwn +++ b/doc/todo/rel_attribute_for_links.mdwn @@ -7,44 +7,13 @@ A rel="" attribute is desirable for links, for example to This patch adds this possibility to htmllink(). - --- IkiWiki.pm.orig 2007-08-04 19:04:36.000000000 +0200 - +++ IkiWiki.pm 2007-08-04 19:19:24.000000000 +0200 - @@ -517,6 +517,8 @@ - $linktext=pagetitle(basename($link)); - } - - + my $rel=(defined $opts{rel} ? $rel=" rel=\"".$opts{rel}."\"" : ''); - + - return "$linktext" - if length $bestlink && $page eq $bestlink; - - @@ -546,7 +548,7 @@ - $bestlink.="#".$opts{anchor}; - } - - - return "$linktext"; - + return "$linktext"; - } #}}} - - sub htmlize ($$$) { #{{{ - This one uses it for tags: -
-    --- tag.pm.orig 2007-08-04 19:06:15.000000000 +0200
-    +++ tag.pm      2007-08-04 19:20:47.000000000 +0200
-    @@ -60,7 +60,8 @@
-     
-            $template->param(tags => [
-                    map { 
-    -                       link => htmllink($page, $destpage, tagpage($_))
-    +                       link => htmllink($page, $destpage, 
-    +                                        tagpage($_), rel => "tag")
-                    }, sort keys %{$tags{$page}}
-            ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags");
+> Both applied, thanks. Leaving the bug open since rel=nofollow etc are
+> still requested here. --[[Joey]]
 
 This can also help for css decoraton. An example of these patches in use: http://poivron.org/~nil/iki/japonesie/horizon_large/
 
 — NicolasLimare
 
-[[tag wishlist patch]]
\ No newline at end of file
+[[tag wishlist patch]]
-- 
cgit v1.2.3