summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-04-21 19:52:39 -0400
committerJoey Hess <joey@kitenet.net>2011-04-21 19:52:39 -0400
commit270fd45c5d30c06f69e18488f08a7f6bdec95813 (patch)
tree997507d536f311c182b0ca924c5c400d3699775d
parent718e9909c6340ef0930ecfb4fec4c21a2a5fd29d (diff)
meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard)
-rw-r--r--IkiWiki/Plugin/meta.pm7
-rw-r--r--debian/changelog1
-rw-r--r--doc/ikiwiki/directive/meta.mdwn9
3 files changed, 17 insertions, 0 deletions
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}}, '<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;
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 <joeyh@debian.org> 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 &lt;meta&gt; header. However, this
won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,