Skip to content

tentwentyfour/mediawiki-extensions-WikibaseInWikitext

 
 

Repository files navigation

mediawiki-extensions-WikibaseInWikitext

Adds the "sparql" tag for rendering SPARQL with some helpful things around it such as list of entities referenced and a link to try it in a sparql UI.

Also hooks in with syntaxhighlight if provided to make it look pretty.

This is currently intended for use on https://wbstack.com and might change without release notes etc.

Settings:

Installation

Download the extension into your MediaWiki extensions directory.

In your LocalSettings.php

wfLoadExtension('WikibaseInWikitext');
$wgWikibaseInWikitextSparqlDefaultUi = 'URL TO YOUR QUERY UI HERE';

Usage

This extensions functionality can be used in wikitext

<sparql list="1" tryit="1">
#Cats
SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P31 wd:Q146.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
</sparql>

About

A MediaWiki extension with some wikibase specific wikitext functionality

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%