summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-09-21 12:30:58 +0200
committerJonas Smedegaard <dr@jones.dk>2017-09-21 12:30:58 +0200
commit8a75cb1028ea8e35149192c4dd9647c0ce5e2581 (patch)
tree82d11d9ee5af24cb011964ae3e6a20cf02b56507
parentaa3aa178f1ded5a78393b54a8f0c47c53c62f5d0 (diff)
Sync with ikiwiki 3.20170622.
-rw-r--r--ikiwiki/directive/meta.mdwn24
1 files changed, 20 insertions, 4 deletions
diff --git a/ikiwiki/directive/meta.mdwn b/ikiwiki/directive/meta.mdwn
index 955648c..3df176c 100644
--- a/ikiwiki/directive/meta.mdwn
+++ b/ikiwiki/directive/meta.mdwn
@@ -13,7 +13,7 @@ per `meta` directive, use more directives if you want to specify more fields.
The field values are treated as HTML entity-escaped text, so you can include
a quote in the text by writing `&quot;` and so on.
-Supported fields:
+## Supported fields
* title
@@ -204,9 +204,25 @@ Supported fields:
\[[!meta foaf=foaf.rdf]]
+* name
+
+ Adds a HTML `<meta>` header with this `name` attribute. Its other attributes are
+ taken from the other parameters, so for example
+ `\[[!meta name="foo" content="bar" x-non-standard-attribute="baz"]]`
+ becomes `<meta name="foo" content="bar" x-non-standard-attribute="baz">`. This
+ won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
+ since it can be used to insert unsafe content.
+
+## Other fields
+
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,
-since it can be used to insert unsafe content.
+written to the generated html page as a &lt;meta&gt; header. For example,
+`\[[!meta foo="bar"]]` becomes `<meta name="foo" content="bar">`. As
+with `name`, this won't be allowed if the [[!iki plugins/htmlscrubber
+desc=htmlscrubber]] plugin is enabled.
+
+This syntax cannot be used for meta headers with unusual names, in
+particular names containing `:` such as `flattr:id` and `twitter:card`.
+Please use `\[[!meta name="..." content="..."]]` for those headers.
[[!meta robots="noindex, follow"]]