# Schema & SEO Automation

**Structured data that stays correct as the catalog changes.**

- Category: SEO · Structured data
- Output: Schema.org · JSON-LD
- Coverage: Per page, generated
- Status: In production

Canonical: https://technologiesninja.com/project-schema-seo-automation.html

## The problem

Structured data had been added manually to a handful of templates and never revisited. Prices in markup disagreed with prices on the page, which is worse than having no markup at all.

Canonical tags were a second problem: a previous templating change had pointed large groups of pages at a single canonical URL, telling search engines to ignore them.

Nothing validated any of this, so errors only surfaced weeks later in Search Console.

## The hard parts

- Markup has to be generated from the same source as the visible page, or it will drift
- Different page types need different schema types, and getting the type wrong is penalised
- Canonicals must be generated per page from real routing, not templated once
- Invalid markup should fail before deployment, not appear in Search Console later
- Breadcrumb and FAQ markup has to correspond to content actually visible on the page

## Architecture

1. **model** — Each page type mapped to the appropriate Schema.org type
2. **generate** — JSON-LD built server-side from the same data that renders the page
3. **canonical** — Canonical URLs derived per page from the real route
4. **validate** — Generated markup validated in the pipeline; invalid output fails the build
5. **crawl** — Internal crawl checks coverage, duplicate titles and orphaned pages
6. **monitor** — Search Console data reviewed against expected coverage

**Stack:** Laravel · Schema.org · JSON-LD · PHP 8.3 · MySQL

## What shipped

- Per-page JSON-LD generated from page data, so markup cannot drift
- Correct schema type per page type across the site
- Canonical URLs derived from real routing rather than templated
- Validation in the deployment pipeline, failing the build on invalid markup
- Crawl reporting for duplicate metadata and orphaned pages
- Breadcrumb and FAQ markup tied to visible page content

## Result

**Per page** — Markup that maintains itself.

Structured data is now generated from the same source as the page, so a price change updates both. The class of error where markup contradicts content is designed out.

Canonical tags are derived per page from routing, which resolved the duplicate-content signals the previous templating had created.

Validation happens before deploy, so invalid markup fails a build instead of surfacing in Search Console weeks later.

## Read next

- **Google Ads Analytics Dashboard** (Case study) → /project-google-ads-dashboard
- **Tracking & Analytics** (Service) → /service-tracking-analytics
- **Laravel Web Applications** (Service) → /service-laravel-development

---
© 2026 TechnologiesNinja · Built and maintained in-house
