Skip to content

Ecosystem Integrations

Seo isolates every optional sibling integration under src/Integration/<Module>/ and boots it only when the sibling module is installed.

When Ai is installed, Seo registers SeoCapabilityProvider with two RBAC-checked scopes (seo:read and seo:write):

  • Tools:
    • seo_site_health (requires seo-admin): Summarizes site-wide average SEO score, optimal/attention counts, and environment status.
    • seo_inspect_page (requires seo-admin or page-edit + $page->editable()): Returns resolved SeoBag, readiness score checks, and schema diagnostics for a page.
    • seo_redirects_list (requires seo-admin): Lists configured redirect rules.
    • seo_redirects_save (requires seo-admin + seo:write): Creates or updates redirect rules while respecting WriteMode::DraftOnly (never modifying or unpublishing existing live redirects in draft mode).
    • seo_404_list (requires seo-admin): Lists unresolved 404 monitor entries.
  • Resources & Prompt: pw://seo/overview, pw://seo/page/{id}, and the seo_page_optimize editorial optimization prompt.

When Currency is installed, Seo hooks Seo::resolveBlueprint for seo-mappings to dynamically populate schema_currency choices from active currencies (Currency::currencyOptions()), refreshing blueprints automatically when currency records change.

3. Headless (headlessProviders => ['seo'])

Section titled “3. Headless (headlessProviders => ['seo'])”

When Headless is installed, SeoHeadlessProvider mounts three REST API endpoints under /api/v1/seo/* with OpenAPI 3.1 schemas and generated TypeScript interfaces:

Method & Endpoint Scope / Auth Response
GET /api/v1/seo/resolve?path=/... or ?page_id=123 Principal or guest viewability (runAsUser()) { resolved, redirect, seo: { meta, social, jsonLd, scripts } } including normalized meta.icons[] and openGraph.publishedTime / modifiedTime.
GET /api/v1/seo/settings Principal or guest Sanitized global SEO and identity configuration (ID-only analytics tokens, no secrets).
GET /api/v1/seo/redirects?limit=50&start=0 seo:read Paginated enabled redirect rules (id, source_path, target_url, status_code, match_type).

When Media is installed, Seo:

  • Enables the Library picker (allowLibrary) on og_image, site_icon, default_og_image, and entity_logo.
  • Appends 'media' to seo-mappings.image_field so templates can fall back to FieldtypeMedia fields.
  • Resolves MediaAssetItem / MediaAssetArray values for Open Graph (1200x630 og_card), XML image sitemaps, and site icons while enforcing a strict public-only boundary (rejecting private, hidden, trashed, unpublished, non-'site' owner, or non-image assets).

Lazy Pull-Discovery (seoHooks and seoSchemas)

Section titled “Lazy Pull-Discovery (seoHooks and seoSchemas)”

Your own modules do not need 'autoload' => true just to hook Seo::resolve or register a SchemaProviderInterface. Declare 'seoHooks' or 'seoSchemas' in getModuleInfo() so Seo loads your module lazily only when needed:

<?php
declare(strict_types=1);
namespace ProcessWire;
return [
'title' => 'Aegean Yacht Schemas',
'version' => 1,
'singular' => true,
'autoload' => false,
'seoHooks' => ['Seo::resolve'],
'seoSchemas' => [
'yacht' => \ProcessWire\YachtSchemaProvider::class,
],
];

Next steps