meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard)
authorJoey Hess <joey@kitenet.net>
Thu, 21 Apr 2011 23:52:39 +0000 (19:52 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 21 Apr 2011 23:52:39 +0000 (19:52 -0400)
IkiWiki/Plugin/meta.pm
debian/changelog
doc/ikiwiki/directive/meta.mdwn

index cd6fa20bab87e3d74a0480e4eefaee08bbd74e2b..b857f453ebf0a1784eb90edf4f2b0670fdb8866c 100644 (file)
@@ -217,6 +217,13 @@ sub preprocess (@) {
                                'content="'.encode_entities($url).'" />';
                }
        }
+       elsif ($key eq 'foaf') {
+               if (safeurl($value)) {
+                       push @{$metaheaders{$page}}, '<link rel="meta" '.
+                               'type="application/rdf+xml" title="FOAF" '.
+                               'href="'.encode_entities($value).'" />';
+               }
+       }
        elsif ($key eq 'redir') {
                return "" if $page ne $destpage;
                my $safe=0;
index a72ea6451f8aef649d9e1a81cb589c683d74bc19..db672bd529e438b47614c4777622ec68f5ae6b0d 100644 (file)
@@ -11,6 +11,7 @@ ikiwiki (3.20110329) UNRELEASED; urgency=low
   * meta: Fix bug in loading of HTML::Entities that can break inline
     archive=yes (mostly masked by other plugins that load the module).
   * Be quiet about updating wrappers, except in verbose mode. (jmtd)
+  * meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard)
 
  -- Joey Hess <joeyh@debian.org>  Mon, 28 Mar 2011 13:08:23 -0400
 
index 9c2147264d75b35ddc4381179c369261d782214b..6b381f138b0fbbd666ea37b20e0dbe5860e7348a 100644 (file)
@@ -181,6 +181,15 @@ Supported fields:
   value. The date/time can be given in any format that
   [[!cpan TimeDate]] can understand, just like the `date` field.
 
+* foaf
+
+  Adds a Friend of a Friend ([FOAF](http://wiki.foaf-project.org/w/Autodiscovery))
+  reference to a page.
+
+  Example:
+
+       \[[!meta foaf=foaf.rdf]]
+
 If the field is not one of the above predefined fields, the metadata will be
 written to the generated html page as a &lt;meta&gt; header. However, this
 won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,