Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
This plugin allows you to set metadata for a page. This is useful for overriding default DokuWiki metadata, for example if you want to display someone else than the user who pasted the text into the wiki as the author of a blog entry.
~~META: key = value ~~
|key||the metadata element to set||required|
|value||the metadata element content||required|
You can set more than one element at once by using an
& delimiter. Further, to set a child element, separate key and subkey with a space. Additional whitespace is allowed. Dates should be entered in the form
YYYY-MM-DD hh:mm:ss. Two dates with an arrow (
->) in between are considered as a period.
~~META: creator = Esther Brunner &date valid = 2006-04-15 -> 2006-10-15 ~~
It is mandatory to use Dublin Core element names as keys for all metadata that might be interesting for external use. These are:
|title||—||string|| will be used for window title and links if
|creator||—||string||indicates the primary author of a page; defaults to the full name of the user who created the page|
|subject||—||string||used by the blog plugin / tag component: list of space separated tags; not set by default|
|description||tableofcontents, abstract||array|| tableofcontents is an array of the TOC items with keys
|contributor||—||array||a list of all users who have made non-minor contributions to the page; every item has the user ID as key and the full name as value|
|date||created, valid, available, issued, modified||array|| a timestamp (or an array of the timestamps
|type||—||string||not set, but defaults to “text” when exported; recommended values are: collection, dataset, event, image, interactiveresource, movingimage, physicalobject, service, software, sound, stillimage or text|
|format||—||string||a MIME type is expected; not set, but defaults to “text/html” when exported|
|identifier||—||string||a unique ID of the page; not set, but defaults to the page ID when exported|
|language||—||string||a two-letter language code is expected; not set, but defaults to the chosen language for DokuWiki when exported|
|relation||isversionof, hasversion, isreplacedby, replaces, isrequiredby, requires, ispartof, haspart, isreferencedby, references, isformatof, hasformat, conformsto||array||each of the child elements can contain a list of pages that stand in the indicated relation to the current page; the page ID serves as key, the existence of the page as value; in references, DokuWiki keeps track of which pages are linked by the current page;|
|coverage||spatial, temporal||array||not used|
|rights||accessrights, license||array||not set, but accessrights default to “public editable”, “public viewable” or “private” with respect to current ACL settings; license defaults to the Creative Commons license if set|
Please report bugs or feature requests at the Bug tracker.
This is quite nice. I'm thinking being able to set metadata on pages would be much more useful if combined with searching facilities to then display stuff based on those searches.
Sorry but this is completely out of the scope of this plugin. — Michael Klier 2008/04/19 22:08
Perfect plugin - almost :) It seems that the feed.php of DokuWiki does not care about the META Tag. Is this a bug or a feature?
Secondly: wouldn't it be nice to be able to overwrite the “original” metadata of DokuWiki with the contents of the META Tag? Or is it out of scope?
Has this plugin gone the way of the Dodo Bird? I'd like to use it, but clicking the download link gives me a 404. — tony baldwin 2011/05/04 20:45
This should have been fixed as it is working perfectly right now. — Olivier Humbert 2015/07/25 12:31
You should change “It is recommended to use Dublin Core element names as keys…” to something in the lines of “It is mandatory for keys of added metadata to be part of the set of allowed Dublin Core element names…”; this given that, as the DokuWiki metadata parser will only accept DublinCore keys and no custom keys, any uninformed attempt to add metadata to a page will fail miserably. I assume that's what has happened in the comment above.
You're right of course. I've changed it. — Michael Klier 2008/04/19 22:08
It's rather sad, as even through the plugin's syntax can be easily adapted to also accept
http-equiv metadata (such as Refresh or Encoding), the DW parser itself will not allow it. Otherwise, thanks for this plugin. — This comment 2008-02-10 by
ryan.chappelle at his site
Hi, I don't get the Plugin to work.[…].— This comment 2008-05-05 by
I found the Error myself. It was a outdated Template that I used. — This comment 2008-05-05 by
It did not work on my site (latest release - incognitek template), it did not change my pages … How can I proceed to see what's wrong ? This comment 2008-11-01 by
It does work right now. Is it still wrong for you ? Olivier Humbert - 2015-07-25 12:33
I wonder how to make the array definitions - is there a bug or am I doing something wrong? I tried it in PHP style because the source looked as it would be treated that way:
~~META: relation haspart = array("testpage" => "1") ~~
and just got PHP execution errors This comment 2009-05-22 by
This is not how this was supposed to work, now you can use
~~META:relation haspart=testpage~~and the plugin will automatically determine if the page exists and set the metadata appropriately. — Michael Hamann 2015-07-24 21:50