Semanticmediawiki: SMW and Google: schema.org and JSON-LD in SMW?

Created on 29 Mar 2021  路  6Comments  路  Source: SemanticMediaWiki/SemanticMediaWiki

Dear all,
the Google documentation ask websites to provide structured data in three different formats. While IMO Microdata and RDFa are really something that does not fit to SMW, it should be easy to implement a JSON-LD representation.

It seems anachronisitc to me to try to implement JSON-LD when you have a full RDF/XML representation available, but it seems that Google is not acknowledging this. I have raised this question also in a Google forum.

While it is easily possible to use schema.org as external vocabulary in our RDF, it does not make any sense if google ignores the markup that SMW provides in the HTML source to link to the RDF:
<link rel="alternate" type="application/rdf+xml" title="Pagename" href="/wiki/index.php?title=Special:ExportRDF/Pagename&amp;xmlmime=rdf"/>

So this issue is to discuss whether there are easier solutions, such as having some schema.org in the HTML linking to the RDF/XML or if we need to implement a JSON-LD feature in SMW to ensure the best possible Google search experience for SMW sites.

question

Most helpful comment

SMT would be a way to go. Result format does not work IMO. I don't want to have extra parsing on every page or manual configured result formats. This has to be automated (besides some general configuration). On the part where SMW inserts the

All 6 comments

there is a MediaWiki extension trying something like this: https://github.com/teran/mediawiki-GoogleRichCards

I guess this is something for a result format to either SMT or even for a dedicated extension.

SMT would be a way to go. Result format does not work IMO. I don't want to have extra parsing on every page or manual configured result formats. This has to be automated (besides some general configuration). On the part where SMW inserts the

It seams that the Wikibase client added a basic functionality - thus the German Wikipeda articles already have JSON-LD in them:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/465547/

E.g. https://de.wikipedia.org/wiki/Vjosa_Osmani

<script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Vjosa Osmani","url":"https:\/\/de.wikipedia.org\/wiki\/Vjosa_Osmani","sameAs":"http:\/\/www.wikidata.org\/entity\/Q13047644","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q13047644","author":{"@type":"Organization","name":"Autoren der Wikimedia-Projekte"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2020-02-22T21:57:16Z","dateModified":"2021-04-06T09:37:44Z","image":"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/0\/01\/Vjosa_Osmani_2020.jpg","headline":"Pr\u00e4sidentin der Republik Kosovo"}</script>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mwjames picture mwjames  路  3Comments

alex-mashin picture alex-mashin  路  4Comments

MvGulik picture MvGulik  路  4Comments

djoris picture djoris  路  4Comments

SteveRMann picture SteveRMann  路  4Comments