Schema.org Blueprints: WebPage

Created on 9 February 2024, 10 months ago
Updated 27 February 2024, 9 months ago

Problem/Motivation

Allow Schema.org's WebPage type and properties to be applied to all content types.

Proposed resolution

  • Conceptually, any page (i.e., in Drupal, a node) with a URI is a WebPage that can include breadcrumb, primaryImageOfPage, relatedLink, significantLink, and more…
  • This module allows nodes to have primary Schema.org mapping while still allowing a node to be mapped to a Schema.org WebPage.
  • For example, a Recipe may also want to include a WebPages' relatedLink property and define the primaryImageOfPage.

Approach

  • A page content type must be mapped to a WebPage.
  • Drupal's Standard installation profile includes a 'Page' content type.
  • As Schema.org types are created and updated, the site builder can decide if a Schema.org content type should also be mapped to a WebPage.
  • Site builders will be able to select the WebPage fields should be copied over the Schema.org content type.
  • The Schema.org content type will include all fields (aka properties) from the primary Schema.org type (i.e., Recipe) and the secondary Schema.org type (i.e. WebPage)
  • When the JSON-LD is generated for the Schema.org content type, the primary Schema.org type will be nested in the WebPage type via the mainEntity property.

Reference

Notes

  • Currently, only nodes will support the WebPage Schema.org type and properties.
  • The code will be written to support other entity types in the future.
  • Should reuse mapping manager load and create methods.

Completed tasks

  • .

Remaining tasks

  • Configuration settings
  • Mapping defaults
  • Starter kits support
  • Test coverage
  • Create services
  • Update existing starter kits, including recipes and events.

User interface changes

New Schema.org WebPage mapping details widget

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024