Deploying JSON-LD on a legacy CMS often means waiting on a developer release cycle for something that's really just a content change. Injecting structured data at the CDN edge with Cloudflare Workers (or an equivalent NGINX layer) lets you parse backend data and add JSON-LD directly into the HTML head before the response reaches the crawler — without touching CMS code at all.
A minimal injection worker
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const response = await fetch(request)
const contentType = response.headers.get('content-type')
if (!contentType || !contentType.includes('text/html')) {
return response
}
const schemaData = {
"@context": "https://schema.org",
"@type": "Article",
"headline": "Edge Schema Injection Guide",
"author": { "@type": "Person", "name": "Paul Lovell", "url": "https://www.paullovell.uk" }
}
const jsonLdScript = `<script type="application/ld+json">${JSON.stringify(schemaData)}</script>`
return new HTMLRewriter()
.on('head', {
element(element) {
element.append(jsonLdScript, { html: true })
}
})
.transform(response)
}Why this is worth doing
Schema updates deploy globally within seconds via CDN rules rather than a release pipeline, and because the injection happens on the raw HTML response, the JSON-LD is present during the crawler's first pass — no JavaScript execution required to see it. The tradeoff is that this markup now lives outside your CMS, so it needs its own change log and testing discipline rather than inheriting the CMS's.
Related articles
Entity Disambiguation for Technical SEO: sameAs and Graph Connections
Search engines evaluate connected entities now, not keyword strings. Disambiguation is how you tell them precisely which entity you mean.
E-Commerce Schema Edge Cases: Variants, Regional Pricing, and Stock
Basic Product schema works until variants, currencies, and stock status enter the picture. Here's the pattern that avoids the validation errors.

Written by
Paul Lovell
International SEO Consultant & Founder of Always Evolving SEO. 15+ years running technical audits, log-file analysis, and root-cause fixes for multimillion-dollar businesses — speaker at SMX London, Search & Content Summit, and SEMrush events.