This project is not covered by Drupal’s security advisory policy.

JSON-LD Schema Injector

Adds configurable JSON-LD structured data to your Drupal site for improved SEO and rich search results.
Define a global schema for the entire site or inject specific schemas based on URL path patterns — all without writing code.

Configuration screenshot

Form screenshot

Overview

  1. Add structured data site-wide (e.g., Organization, WebSite)
  2. Inject different schemas on specific paths (e.g., /blog/*, /about-us)
  3. Validate JSON before saving
  4. Manage everything from a simple admin UI
  5. No frontend changes, theme overrides, or JavaScript required

Features

Global Schema (All Pages)

Add a single JSON-LD block that appears on every page of the site.

  • Organization schema
  • WebSite schema
  • Publisher schema

Path-Based Schema Injection

Attach specific JSON-LD blocks to matching paths.

  • Exact paths — /about-us
  • Wildcards — /blog/*
  • Front page keyword — <front>

Multiple path/schema combinations can be configured.

Dynamic “Add More” Support

Uses AJAX to allow adding unlimited schema entries in the configuration form.

Installation

  • Place the module in /modules/custom/jsonld_schema_injector
  • Enable it via Extend
  • Grant permission: Administer JSON-LD Schema Injector
  • Configure at: /admin/config/system/jsonld-schema-injector

Why Use This Module?

  • Lightweight
  • Developer-friendly
  • No dependencies
  • Works with any theme
  • Ideal for SEO optimization
Supporting organizations: 

Project information

Releases