Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement JSON-LD data for events #1442

Open
NickSto opened this issue Jun 9, 2022 · 7 comments
Open

Reimplement JSON-LD data for events #1442

NickSto opened this issue Jun 9, 2022 · 7 comments
Labels
new-feature Issue making a feature request, or a PR implementing a new feature.

Comments

@NickSto
Copy link
Member

NickSto commented Jun 9, 2022

This was implemented in Hub 1.0, and instead of reimplementing it after the rewrite, we went with the Hub unification effort as a solution for crossposting content across communities. But:

So a lot of european projects e.g. TeSS require json-ld, and it's incredibly useful for that
they are the "training materials and event scraper for europe" from elixir
removing this will break that ingest, unfortunately
If it would be possible to resurrect that, it'd be really useful for european collaboration efforts!

- @hexylena

Hub 1.0 had JSON-LD on the /events/ page: one blob per event, each in its separate <script> tag:

<script type="application/ld+json">{ 
 "@context": "http://schema.org/",
   "@type": "Event",
   "name": "Speed up your data analysis with Galaxy: Features no one knows about","url": "https://galaxyproject.eu/event/2021-01-15-webinars-adv-features-session4/", "duration": "P1D",
"location": {
   "@type": "Place",
   "address": "Galaxy-ELIXIR Advanced Features webinar series, Online, Europe", 
"url": "https://us02web.zoom.us/webinar/register/WN_oIXQYaCpTfqp9RgOu6gj3g" },
"contact": {
 "@type": "person",
 "name": "Jennifer Hillman-Jackson, Anika Erxleben"
},"startDate": "2021-03-24"
}</script>

But @hexylena had some suggestions for improving that:

  • some are Event, some are Course and they're semantically separate
  • contact is a Many field, so we don't have to squash multiple people in as if they were one person

For reference, the original issue for adding it to Hub 1.0: #252

Here's a thread on ways to do this in Gridsome: gridsome/gridsome#352

@NickSto NickSto added the new-feature Issue making a feature request, or a PR implementing a new feature. label Jun 9, 2022
@hexylena
Copy link
Member

hexylena commented Jun 9, 2022

Thanks @NickSto! if y'all get something started, I can maybe work on making it match all the schema properties?

@NickSto
Copy link
Member Author

NickSto commented Jun 10, 2022

One question about implementation is whether to put json-ld blobs on the /events/ page and/or one blob on each individual event's page. The old .org Hub did the former and .eu does the latter.

According to @hexylena, if we have a sitemap, sites like TeSS can use that to find every event page and extract the json-ld from there, so we don't have to include the blobs on the /events/ page.

We don't currently have a sitemap, but there's a Gridsome plugin for that, so hopefully it should be easy.

@NickSto
Copy link
Member Author

NickSto commented Jul 7, 2022

Another tidbit from @hexylena: For compatibility with TeSS's scrapers, we need to make sure to use bioschemas.

@hexylena
Copy link
Member

hexylena commented Jul 7, 2022

Yeah but like, no dramas. Implement the JSON ld bits with a demo of how to access page variables and I can take it from there.

This was referenced Jul 29, 2022
@NickSto
Copy link
Member Author

NickSto commented Jul 29, 2022

Okay, so I wrote an initial implementation and pushed it here: #1564. The makeJsonLd() function in ArticleHeader.vue is where the rubber meets the road. Feel free to extend/improve or I can work more on it later.

Note (mostly to myself): we're using a bioschema extension to Event that includes a contact property: https://bioschemas.org/profiles/Event/0.2-DRAFT-2019_06_14

@hexylena
Copy link
Member

Fantastic! I'll have a look into it, maybe we can discuss during EGD @NickSto

@hexylena
Copy link
Member

hexylena commented Jun 7, 2023

Oh, right, I made this my task. That's why it still hasn't been fixed :| righto, will get around to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Issue making a feature request, or a PR implementing a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants