WordPress.org

Making WordPress.org

Opened 2 weeks ago

Last modified 9 days ago

#5512 new enhancement

Add VideoObject schema to wordpress.tv video pages

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: high
Component: WordPress.tv Keywords: seo
Cc:

Description

Individual video pages, like https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/, should output structured data which describes the video in the <head> of the template.

This will make the pages eligible for rich(er) results in search engines.

The following example is based on https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/, and variables should be fairly self-explanatory, with some considerations:

  • I've assumed that all videos are assumed to be family-friendly; this may not always be the case.
  • The language code can be inferred (and converted to country code, such as fr or es) from the video's language categorisation.
  • When there are multiple speakers, additional Person nodes should be added to the actor array.
  • Missing properties (e.g., in the case of a video without a description) should be omitted.
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "VideoObject",
      "name": "Chris Ferdinandi: The Lean Web",
      "url": "https://wordpress.tv/2020/10/29/chris-ferdinandi-the-lean-web/",
      "contentUrl": [
	"https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_std.mp4",
        "https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_dvd.mp4",
        "https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_hd.mp4",
        "https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_fmt1.ogv"
      ],
      "description": "The web in 2020 is a bloated and over-engineered mess! Many modern web development “best practices” are making the web worse. This thought-provoking talk shares ideas on how to fix the problem as it explores an alternate set of best practices.",
      "duration": "P0DT0H49M43S",
      "height": 640,
      "inLanguage": "en",
      "isFamilyFriendly": true,
      "thumbnailUrl": "https://videos.files.wordpress.com/rFicEAZ7/video-40c6f679f8_scruberthumbnail_0.jpg",
      "uploadDate": "2020-10-29",
      "width": 634
    }
  ]
}
</script>

Note that this is the first step in establishing a much richer schema ecosystem on this site, and multiple tickets will follow as we enrich and extend these data structures (as well as adding them to other page types).

Change History (6)

#1 @jonoaldersonwp
2 weeks ago

  • Type changed from defect to enhancement

#2 @dd32
9 days ago

In 10463:

WordPress.TV: Add initial implementation of ld+json schema.

See #5512, #1156 (For the Slug => Locale expansion)

#3 @dd32
9 days ago

In 10464:

WordPress.TV: Remove the recordedAt property from the schema data, as we don't have the required information to fully fill out the Event type.

See #5512.

#4 @dd32
9 days ago

In 10465:

WordPress.tv: Fix a variable typo.

See #5512.

#5 @dd32
9 days ago

In 10466:

WordPress.tv: Limit the output to singular video pages.

See #5512.

#6 @dd32
9 days ago

In 10467:

WordPress.tv: Add a Date Recoded field for more complete video details.

See #5512, #1442.

Note: See TracTickets for help on using tickets.