Drupal is a registered trademark of Dries Buytaert
seven 2.0.0-beta6 New beta version released for theme seven (2.0.0-beta6). seven 1.0.1-beta1 First beta version released for theme seven (1.0.1-beta1). swiper_formatter 2.1.1 Minor update available for module swiper_formatter (2.1.1). solo 1.0.31 Minor update available for theme solo (1.0.31). raven 7.3.7 Minor update available for module raven (7.3.7). kordiam 1.0.13 Minor update available for module kordiam (1.0.13). varbase_components 2.0.16 Minor update available for module varbase_components (2.0.16). node_singles 3.4.7 Minor update available for module node_singles (3.4.7). flowdrop 1.1.1 Minor update available for module flowdrop (1.1.1). emporiqa 1.0.20 Minor update available for module emporiqa (1.0.20). digital_asset_inventory 1.1.1 Minor update available for module digital_asset_inventory (1.1.1). diba_integration 1.2.6 Minor update available for module diba_integration (1.2.6). localgov_scarfolk 2.0.0 Major update available for theme localgov_scarfolk (2.0.0). entity_extra_field 2.1.4 Minor update available for module entity_extra_field (2.1.4). plugin_configuration_field 1.0.2 Minor update available for module plugin_configuration_field (1.0.2). localgov_openreferral 2.1.1 Minor update available for module localgov_openreferral (2.1.1). localgov_directories 3.4.5 Minor update available for module localgov_directories (3.4.5). drupalfit 1.1.2 Minor update available for module drupalfit (1.1.2). sibs_api_commerce 1.0.6 Minor update available for module sibs_api_commerce (1.0.6). sibs_api_commerce 1.0.5 Minor update available for module sibs_api_commerce (1.0.5).

This module helps site builders and content editors add schema.org JSON-LD structured data to a Drupal site without writing JSON by hand. It uses the Drupal AI (Artificial Intelligence) module to generate valid schema from your content or from any internal URL. JSON-LD is output in the page <head>, which can improve how search engines and other tools understand your pages (e.g. rich results, knowledge panels). The module works with any AI provider configured in the AI module (e.g. OpenAI) and supports both content-based schema (per node) and URL-based schema (per path), with preview, validation, and optional auto-generation on publish or update.

Features

What is the basic functionality?

  • AI-generated JSON-LD: Uses the Drupal AI module to generate schema.org JSON-LD from page content or from a fetched URL. No direct external API keys in this module—all calls go through the AI module.
  • Content (node) schema: For enabled content types, a "Generate Schema via AI" button appears on the node edit form. After generation you get a preview, can fix or regenerate, then save. Schema is stored by path and attached when that page is viewed.
  • URL-based schema: You can add any internal path (e.g. /about, /services) and have the module fetch the page, extract text, and ask the AI to produce schema. Results are saved as "Schema mappings" and attached when that path is viewed.
  • Output: One or more <script type="application/ld+json"> blocks are added to the page <head> for the current path. Site-wide Organization/WebSite can be set once in configuration.

What unique features does enabling this project add?

  • Multiple schema types per page: The AI can return several schema.org types in one go (e.g. Article + BreadcrumbList, WebPage + FAQPage). Each is validated and output as a separate JSON-LD block.
  • Preview and validation: Before saving, you see a preview of all blocks and validation messages (e.g. missing @context/@type). You can open a link to Google Rich Results Test to double-check.
  • Configurable prompt: A single prompt template (with {{ content }}) drives generation. The default prompt is content-based: the AI infers types (Article, Event, Service, BreadcrumbList, FAQPage, etc.) from the text. You can customize the prompt in the settings form.
  • Optional auto-generation: Optionally generate schema when a node is first published or when it is updated, so editors don't have to click "Generate" every time.
  • Rate limiting: Configurable limits (e.g. N generations per user per hour) via Drupal's Flood API to avoid overuse of the AI provider.
  • Token-based or full-page content: For nodes, you can send either a token-rendered snippet (e.g. title, body, URL) or the full rendered page (including blocks) to the AI.

When and why would someone use this module?

  • You want rich results or better indexing (e.g. articles, events, FAQs, breadcrumbs) and prefer not to maintain JSON-LD by hand.
  • You want schema generated from existing content or from any URL on the site, with a single UI and optional automation.
  • You already use or plan to use the Drupal AI module and want a dedicated, SEO-focused workflow for structured data.

What use cases are there?

  • Editorial / marketing sites: Article, BlogPosting, breadcrumbs, author, dates; optional Organization/WebSite site-wide.
  • Product or service sites: Product, Service, FAQPage, HowTo, ContactPage, AboutPage.
  • Events / webinars: Event schema with date, location, performers.
  • List/landing pages: ItemList, WebPage; optional BreadcrumbList when breadcrumb text is provided.
  • Mixed content: One prompt and one workflow for many content types; the AI chooses the right types per page.

Post-Installation

How does this module work once I install it?

  1. Configuration: Go to Configuration → AI (or Configuration → AI JSON-LD Schema Generator if your menu is flat). The main settings page is the AI JSON-LD Schema Generator link.
  2. Required setup: Choose an AI provider and model (from the AI module's configured providers) or leave default. Enable at least one content type that should show the "Generate Schema via AI" button.
  3. Optional site-wide schema: In the same form you can paste Organization and WebSite JSON-LD (with tokens like [site:name], [site:url] if supported). These are attached on every page so the AI doesn't need to output them per URL.
  4. Content workflow: Edit a node of an enabled content type. Use "Generate Schema via AI" (or "Preview Generated Schema" / "Edit Generated Schema" if you already have schema). On the preview page, review blocks and validation, then Save schema or Regenerate.
  5. URL-based workflow: Open Schema mappings (from the same config section). Add a new mapping or use the URL generator: enter an internal path, generate, then preview and save. Those mappings are attached when the path is visited.
  6. No new content type: The module does not create a content type. It adds a button to existing node edit forms and stores schema in an internal entity keyed by path.
  7. Permissions: Assign "Generate AI schema" to roles that may generate schema; "Administer AI schema settings" for the config form; "Manage URL schema" for Schema mappings and the URL generator.

Special considerations

  • Schema is generated from saved node content (or from the live URL for URL-based generation). For nodes, save the node first if you just edited it, then generate.
  • Rate limits apply to both node and URL generation; when exceeded, users see a message and auto-generation is skipped (node save still succeeds).
  • Clearing caches may be needed after changing site-wide schema or after installing the module.

Additional Requirements

Beyond Drupal core, this project needs:

  • Drupal 11 (core_version_requirement: ^11).
  • AI (Artificial Intelligence) module (drupal.org/project/ai) — required. All AI calls go through this module.
  • At least one configured AI provider in the AI module (e.g. OpenAI via drupal.org/project/ai_provider_openai), with valid API credentials configured there.

Activity

Total releases
2
First release
Mar 2026
Latest release
14 hours ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Mar 17, 2026
1.0.x-dev Dev Mar 17, 2026