open-life-science / open-life-science.github.io

OLS website: web presence and knowledge management for we-are-ols.org
https://we-are-ols.org
MIT License
65 stars 87 forks source link

Bug in BioSchema implementation #727

Closed bebatut closed 4 months ago

bebatut commented 11 months ago

JSON contains linebreaks in some places which is not permitted, e.g.

image

bebatut commented 11 months ago

To be valid JSON-LD IDs the spaces need to be escaped, so ""Open Life Science-OLS Introduction-1" becomes "Open%20Life%20Science-OLS%20Introduction-1" for example. there is another slight issue with that too, because @ids are URIs, so the above would actually be the short form of https://openlifesci.org/openseeds/Open%20Life%20Science-OLS%20Introduction-1 which does not actually resolve to any page. typically when using an @id that does not point to a URL, you can use # at the start, so altogether it would look something like "@id" : "#Open%20Life%20Science-OLS%20Introduction-1

yochannah commented 8 months ago

idk if this is related or not to the failures of structured metadata warnings we've been getting from google's search dashboard - flagging for @NPDebs's attention.

NPDebs commented 8 months ago

Thanks for flagging!

It most likely is related. This is on my radar now, so we'll see. 👀