From 270fd45c5d30c06f69e18488f08a7f6bdec95813 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 Apr 2011 19:52:39 -0400 Subject: meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard) --- IkiWiki/Plugin/meta.pm | 7 +++++++ debian/changelog | 1 + doc/ikiwiki/directive/meta.mdwn | 9 +++++++++ 3 files changed, 17 insertions(+) diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index cd6fa20ba..b857f453e 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -217,6 +217,13 @@ sub preprocess (@) { 'content="'.encode_entities($url).'" />'; } } + elsif ($key eq 'foaf') { + if (safeurl($value)) { + push @{$metaheaders{$page}}, ''; + } + } elsif ($key eq 'redir') { return "" if $page ne $destpage; my $safe=0; diff --git a/debian/changelog b/debian/changelog index a72ea6451..db672bd52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 28 Mar 2011 13:08:23 -0400 diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 9c2147264..6b381f138 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -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 <meta> header. However, this won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled, -- cgit v1.2.3