In short. Install Schema.org Metatag and relevant schema submodules, configure content-type defaults with field tokens, and validate the resulting JSON-LD.
Definition: Schema.org Metatag extends Drupal's Metatag module to output structured data, information expressed as named properties, in the JSON-LD format in a page's HTML head. Schema submodules provide the property fields; token replacements pull values from the site's content into those fields.
Key facts
- As of 17 October 2026, the Schema.org Metatag project documents defaults for content types and overrides for individual content items.
- Drupal's Basic Usage guide requires Metatag and recommends enabling schema submodules relevant to the site's content.
- The Example Article setup maps
headlineto[node:title]anddatePublishedto[node:created:html_datetime].
Which modules need installing?
The Drupal CMS User Guide describes installing Schema Metatag, then opening Extend > List and filtering for Schema.org. The modules selected there correspond to the structured data types needed for the site's content. Installing a schema module adds its group of fields to the Metatag defaults form.
The Basic Usage guide gives a news site example using schema_metatag, schema_web_site, and schema_article. Its workflow starts with global settings at:
admin/config/search/metatag
The guide places WebSite settings at the global level, then adds Article settings to the News content type. This separates site information from the properties of an individual article. Under Operations, Edit opens the defaults form for the selected type, as the Drupal CMS guide explains.
How are content fields mapped to schema properties?
A token is a placeholder that resolves to a value from content or site settings. Drupal's Example Article setup supplies the following property-to-token mappings. These are configuration values for the form, with the author settings nested under the author property:
@type: NewsArticle
headline: [node:title]
name: [node:title]
description: [node:summary]
datePublished: [node:created:html_datetime]
dateModified: [node:changed:html_datetime]
mainEntityOfPage: [current-page:url]
AUTHOR
@type: Person
name: [node:author:display_name]
url: [node:author:url]
The Help With Tokens and Fields guide explains that tokens can follow references to related content. Its Media image example uses:
[node:field_media_image:entity:field_media_image:large:url]
Here, the first field belongs to the content item. entity follows the reference to Media, the next field identifies the image, and large selects the image style. The final url selects the image URL. The field names and image style must correspond to the site's configuration. The same guide specifies absolute image URLs and explains that width and height tokens should use the corresponding image style.
How are overrides and output checked?
The Basic Usage guide recommends token-based defaults that reuse information already displayed on the page. Adding a Metatag field to a content type allows values to be overridden on individual content items; the guide recommends retaining sitewide defaults where possible.
The project documentation lists Schema Markup Validator and Google's Rich Results Test for validation. The module outputs JSON-LD in the HTML head, so checking the generated page means checking the resolved values, including the article headline, dates, and image URL. The Basic Usage guide also recommends occasional revalidation and monitoring issues in Google Search Console.
Related terms
- JSON-LD
- Structured data
- How do I set default meta tags in Drupal's Metatag module?
- How do I use tokens in Drupal meta tag templates?
FAQ
Do I need to type every article's values manually?
The Basic Usage guide recommends using tokens in content-type defaults. You can maintain the underlying content fields while those tokens supply the structured data values.
How do I format publication dates?
The token guide documents [node:created:html_datetime] for a formatted creation date. The Article example pairs that token with datePublished and uses [node:changed:html_datetime] for dateModified.
Sources
- Drupal, "Schema.org Metatag", 19 February 2026, API copy
- Drupal, "Basic Usage", 15 February 2021, API copy
- Drupal, "Example Article setup", 26 May 2020, API copy
- Drupal, "Help With Tokens and Fields", 26 May 2020, API copy
- Drupal CMS User Guide, "Meta tags and Schema.org", accessed 17 October 2026
Check how a page reads to answer engines. Open the GEO score analyzer