Canvas AI SEO
This module automatically generates structured data (Schema.org JSON-LD) for pages built with the Canvas AI page builder. It helps SEO agents by providing information about linkable components on the page and then injecting the generated JSON-LD into the page's response for improved search engine visibility. It also integrates with the Metatag module and validates the output.
Adds structured data generation to the Canvas AI page builder. When an AI agent builds or edits a Canvas page, this module generates Schema.org JSON-LD markup based on the page content and injects it into the page response.
The module provides two AiFunctionCall plugins:
- AddSchemaOrgJson: Generates Schema.org JSON-LD from the page's component tree and attaches it to the canvas page entity. The SEO agent calls this after page content is finalized.
- GetLinkableComponents: Scans the page layout for components that accept internal links (href, url props), returning a structured tree the agent can use for internal linking decisions.
A LayoutResponseSubscriber injects the generated JSON-LD into the page response at render time, and a ConfigAction plugin (AiContextAgentsUpdate) maps ai_context items to the SEO agent during recipe installation.
Integrates with the Metatag module for meta tag management. The JSON-LD output is validated against Schema.org vocabularies and truncated to avoid blocking page publishing for long payloads.