Page MenuHomePhabricator

Sitelinks within a wikibase.cloud site between pages and items
Open, Needs TriagePublicFeature

Description

Feature summary
Allow a wikibase.cloud site to link an Item to a Page within the same wikibase.cloud site.

Use case(s)

  • connect a data item that has structured data about a concept to a textual description of the concept (e.g. a data-item about a musical instrument could be connected to a full text description of that instrument)
  • the ability to link to/store a rich text description from a data-item

Benefits (why should this be implemented?):

  • turn the wikibase.cloud site into more than just a database, but a fully integrated wiki. By using (internal) sitelinks, there is a built-in link back and fro between the page and the item.
  • in contrast to using a formatter url, this would make use of existing tooling already available. A formatter url would require some settings in the dashboard to connect a wikibase property to a wikidata property.

Event Timeline

From Telegram, following my comment there: https://t.me/c/1823978416/573

  • @Salgo60 and Andra also suggested something similar to resolve a request by @Fransemant42
  • https://wikidata.org/wiki/Help:Sitelinks is a feature that is used to centralise links between a concept on Wikidata and on separate languages of Wikipedia, and other Wikimedia wikis. But it is not enabled on Wikibase.cloud; instances are not linked to other wikis and so you cannot say "this item is described at this page on X". I think the question is can it be enabled, although I am not sure if the intent is to link to the item on the Wikibase.cloud instance from other wikis, or from other Wikibase.cloud instances, or from non-entity pages on the same instance.
  • It was last brought up in mid-November but that did not result in a feature request ticket on Phabricator as far as I can see.
  • Does any use case require it to be a sitelink specifically though? As opposed to say a property with a formatter URL
  • You want to link from an entity in your wikibase to a wikitext page on your wikibase? As there are no sitelinks foreseen (like in WD or the factgrid example above), I tried to do it like this https://lexbib.elex.is/wiki/Property:P165 but it doesn't work, it seems the formatter URL leading to the own site is not accepted, e.g. at https://lexbib.elex.is/wiki/Item:Q50#P165. So only option I see is to write the whole url to a prop with datatype URL

Most or all requests of this kind seem to (so far) have wanted to enable sitelinks specifically for the local site.

While this is rarely done on Wikidata, that is because it is specifically designed as the database for other linked wikis; while in the case of Wikibase.cloud it may be the only wiki the administrator has any involvement in. As such, it may not matter so much if it cannot be used to link externally.

There are Lua functions designed to work with a linked item which could be used if this feature were enabled.

The relevant documentation is at https://mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#Enabling_sitelinks

An example of such a self-link is at the bottom of https://m.wikidata.org/wiki/Q113121949

In one of my usecases I also want to link from wikibase entities to a wikitext page about that entity (like Wikidata sitelinks, but on the own wiki). I have checked again, and my attempt to have an externalID property (https://lexbib.elex.is/wiki/Property:P165) with formatter URL "https://lexbib.elex.is/wiki/$1", that is, with my own sitename in the regex pattern, that would link to own wikitext pages, doesn't work; it seems the formatter URL leading to the own site is not accepted, e.g. at https://lexbib.elex.is/wiki/Item:Q50#P165. So, at the moment, the only option to have ownsite-links is to write the whole url to a prop with datatype URL. Couldn't it be allowed to have the own site name in a formatter URL pattern?

For most use cases, that might be sufficient; real "sitelinks" are nicer, since that would allow to have links from wikitext page to item as well in an automated way (as on Wikipedia (WP to WD)). But such a wikitext-to-wbentity link can be inserted in the wikitext body as well when creating that page, since I guess in all use cases the entity lives earlier than the text page.