Freegle / iznik-nuxt

Freegle's web client
https://www.ilovefreegle.org
GNU General Public License v2.0
27 stars 22 forks source link

schema.org #210

Open edwh opened 4 years ago

edwh commented 4 years ago

We ought to add schema.org markup for messages, events, anything else for which it applies.

For events, there is a new organizer property.

Chris did some markup for events at https://www.penrithact.org.uk/fiddling2.htm

<html>
<head>
  <meta charset="UTF-8">
  <!-- https://iznik.ilovefreegle.org/communityevent/142230 -->
</head>
<body id="thebody" class="bodyback">
  <div itemscope="" itemtype="http://www.schema.org/Event" style="display: none" class="js-schemainfo">
    <div itemprop="name" content="Soul &amp; Motown / 60's &amp; 70's Disco Classics hosted by Al 'D' at The Dog Inn, Whal"></div>
    <div itemprop="image" content="/images/user_logo.png"></div>
    <div itemprop="startDate" class="js-schemastart" content="2018-12-30T20:00:00.000Z"></div>
    <div itemprop="endDate" class="js-schemaend" content="2018-12-30T23:30:00.000Z"></div>
    <div itemprop="description" content="Soul &amp; Motown / 60's &amp; 70's Disco Classics hosted by Al 'D' at
The Dog Inn, Whalley, Lancashire, BB7 9SP

Sunday 30th December
8pm onwards

Soul &amp; Motown / 60's &amp; 70's Disco Classics - Hosted by: Al ‘D’

Everyone welcome/free to come down and have a good boogie

POSTAL ADDRESS: The Dog Inn, 55 King Street, Whalley, Near Clitheroe, Lancs, BB7 9SP.

For more information contact : attydoghouse@gmail.com"></div>
    <div itemprop="location" itemscope="" itemtype="http://schema.org/Place">
      <span itemprop="name">The Dog Inn</span>
      <div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress">
        <span itemprop="streetAddress" content="55 King Street, Whalley, Near Clitheroe, Lancs"></span>
        <span itemprop="postalCode" class="js-schemapostcode" content="BB7 9SP"></span>
        <span itemprop="addressCountry">United Kingdom</span>
      </div>
    </div>
    <div itemprop="url" class="js-schemaurl" content=""></div>
  </div>

</body>
</html>
chriscant commented 4 years ago

For virtual events, Google recommend adding the organizer [sic] property:

"Many events are now being hosted in virtual format, without a venue or location. In order to enable event organizers to provide more context to potential attendees, Google has added a new, optional property to Event items: organizer.

This new property is especially important for online events, where there isn't any venue information. When using this property, we recommend specifying at minimum the organizer.name and organizer.url subproperties."

edwh commented 4 years ago

See second line of issue :-).

JayyajGH commented 4 years ago

I've added schema markup once before for events and I went for the JSON-LD format over the microdata format as Google recommend it.

https://developers.google.com/search/docs/guides/intro-structured-data

https://www.searchenginejournal.com/google-structured-data-preference/297479/

As a side note, John Mueller who I think is the Google SEO head honcho is worth following on twitter. He seems to respond to questions as well.

@edwh @chriscant - Did you want to go for the microdata style for a specific reason or are you not bothered?

edwh commented 4 years ago

I'm not bothered. Any knowledge I have about the right thing to do has lapsed. @chriscant ?

chriscant commented 4 years ago

More recently than above I seem to be using JSON-LD. Make sure it appears in the server rendered version. You can test it using this: https://search.google.com/structured-data/testing-tool

<script type="application/ld+json">
--
  | {   "@context": "http://schema.org",   "@type": "Event",   "startDate": "2020-07-22T18:30:00", "description": "Please join us online for a Zoom meeting.Please email or phone Christine to get the meeting link.",
  | "image": ["https://www.penrithact.org.uk/sites/default/files/images/noun_online_1764214.svg"],
  | "location": { "@type": "Place","name": "Online"
  | },
  | "organizer": { "@type": "Organization",
  | "name": "PACT"
  | },
  | "name": "PACT Virtual Get Together" } </script>
JayyajGH commented 4 years ago

I'll have a play and see how it looks. I'll need to check if the way I did it before is still correct.

When I next get a chance I'll knock something up for discussion.

edwh commented 3 years ago

I've put some basic product data in for messages using the old style method, because it was easy. That doesn't stop us doing something better later.