Closed sroertgen closed 8 months ago
Besides I noticed that the URI of schema.org in context.js is not https. It works since schema.org seems to redirect, but in their own documentation the always use https see: https://schema.org/isBasedOn
Here are some more infos on this:
There is a general trend towards using 'https' more widely, and you can already write 'https://schema.org' in your structured data. We have migrated the schema.org site itself towards using https: as the default version of the site and our preferred form in examples. However 'http://schema.org' -based URLs in structured data markup will remain widely understood for the foreseeable future and there should be no urgency about migrating existing data. This is a lengthy way of saying that both 'https://schema.org' and 'http://schema.org' are fine.
source: https://schema.org/docs/faq.html#19
The issue is that the website uses the preferred form in all examples to start with https:// over http:// where the JSON-LD context itself which still uses http:// over https:// (look for the "@vocab": "http://schema.org/" entry). This will block many users from moving to the preferred https:// IMHO.
However, it makes sense to use https
here.
I try it today and give feedback. Thanks!
Unfortunately it does not work this way :cry:
My ttl looks like this:
@base <http://w3id.org/openeduhub/vocabs/sources/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix schema: <http://schema.org/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<003d68a3-1417-44eb-809c-dada652cbb05> a skos:Concept ;
skos:prefLabel "DLRG"@de ;
skos:topConceptOf <> ;
schema:url <https://www.dlrg.de/> .
...
After I made the changes as proposed I looked into GraphQL for
query MyQuery {
allConcept {
nodes {
url
}
}
}
Result:
"errors": [
{
"message": "String cannot represent value: { id: \"https://www.dlrg.de/\" }",
"locations": [
{
"line": 4,
"column": 7
}
],
"path": [
"allConcept",
"nodes",
0,
"url",
0
],
...
And after creating the static pages with npm run build
there is no URL in the index.json.
Does it have to do with the fact, that schema:url is a ressource here and not just a string?
Does it have to do with the fact, that schema:url is a ressource here and not just a string?
Yes, exactly. I should point this out I guess, since it might be a common use case. Give me a minute.
Tried out with the current state of the documentation and now it works! Thanks @sroertgen :+1:
Besides I noticed that the URI of schema.org in context.js is not
https
. It works since schema.org seems to redirect, but in their own documentation the always usehttps
see: https://schema.org/isBasedOn@lummerland do you want to try out if this works for your use case? @acka47 you might also want to have a look at this.