Manual:Semantic Web

From MediaWiki.org
Jump to navigation Jump to search

MediaWiki supports Semantic Web standards, directly in the core or through extensions. A distribution, Semantic MediaWiki also exists to offer a collection of extensions to achieve semantic goals.

Core support[edit]

Out of the box, MediaWiki offers full support for the Microdata standard and partial support for RDFa 1.0 standard.

Microdata[edit]

Microdata allows to integrate metadata in MediaWiki pages.

Specialized tools and search engines can exploit them to get more context for the content.

How to enable it?[edit]

Since MediaWiki 1.27, the support is enabled by default. If you use an older version (> 1.16), you need to add in your configuration (for example in LocaliseSettings.php):

 $wgAllowMicrodataAttributes = true;

How to use it?[edit]

You can directly add HTML tags like <div> with Microdata attributes in the wiki code. If you use the Visual Editor, you need to switch back in code mode, as VE doesn't currently offer Microdata support.

RDFa 1.0[edit]

RDFa is the main W3C semantic standard. HTML+RDFa allows to embed RDFa information in HTML source code.

Plans exist to upgrade this support to [HTML+RDFa 1.1 HTML+RDFa 1.1]. See Requests for comment/Update our code to use RDFa 1.1 instead of RDFa 1.0.

How to enable it?[edit]

Since MediaWiki 1.27, the support is enabled by default. If you use an older version (> 1.16), you need to add in your configuration (for example in LocaliseSettings.php):

 $wgAllowRdfaAttributes = true;