Skip to content

feat(io): add Organization/WebSite/Breadcrumb/Product JSON-LD for ric…#39

Merged
CropWatchDevelopment merged 1 commit into
masterfrom
develop
Jul 7, 2026
Merged

feat(io): add Organization/WebSite/Breadcrumb/Product JSON-LD for ric…#39
CropWatchDevelopment merged 1 commit into
masterfrom
develop

Conversation

@CropWatchDevelopment

Copy link
Copy Markdown
Owner

…h results

Adds a small shared JSON-LD toolkit (src/lib/seo/{site,schema}.ts, src/lib/components/JsonLd.svelte) and wires the still-eligible Google structured -data enhancements:

  • Organization + WebSite once site-wide (root layout)
  • BreadcrumbList: Breadcrumbs.svelte now delegates to the shared breadcrumbSchema
  • Product: one per sensor module on /replacement-sensors + one on /replacement-case (bare Products - no fabricated ratings)

FAQ/HowTo intentionally omitted (Google deprecated both rich-result types). schema.ts + JsonLd.svelte are byte-identical to the Japan-website branch; only site.ts differs. Verified in the prerendered build: exactly one Org+WebSite per page, valid JSON, correct escaping and @id cross-refs.

TODO(confirm): .io Organization sameAs URLs.

…h results

Adds a small shared JSON-LD toolkit (src/lib/seo/{site,schema}.ts,
src/lib/components/JsonLd.svelte) and wires the still-eligible Google structured
-data enhancements:
- Organization + WebSite once site-wide (root layout)
- BreadcrumbList: Breadcrumbs.svelte now delegates to the shared breadcrumbSchema
- Product: one per sensor module on /replacement-sensors + one on /replacement-case
  (bare Products - no fabricated ratings)

FAQ/HowTo intentionally omitted (Google deprecated both rich-result types).
schema.ts + JsonLd.svelte are byte-identical to the Japan-website branch; only
site.ts differs. Verified in the prerendered build: exactly one Org+WebSite per
page, valid JSON, correct escaping and @id cross-refs.

TODO(confirm): .io Organization sameAs URLs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
japan-website Ready Ready Preview, Comment Jul 7, 2026 8:24am
website Ready Ready Preview, Comment Jul 7, 2026 8:24am

Request Review

@CropWatchDevelopment CropWatchDevelopment merged commit 382a9b2 into master Jul 7, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a shared JSON-LD (schema.org) toolkit and wires structured data across the site to support Google’s still-relevant rich-result enhancements (site publisher identity, breadcrumbs, and product entities).

Changes:

  • Introduces reusable JSON-LD builders (src/lib/seo/{site,schema}.ts) and a <JsonLd> head-injection component.
  • Emits site-wide Organization + WebSite structured data once from the root layout.
  • Emits BreadcrumbList from Breadcrumbs.svelte via the shared builder, and adds Product JSON-LD to the replacement sensors/case pages.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/routes/replacement-sensors/+page.svelte Adds per-sensor Product JSON-LD emission for the replacement sensors page.
src/routes/replacement-case/+page.svelte Adds a single Product JSON-LD entity for the replacement case page.
src/routes/+layout.svelte Injects site-wide Organization + WebSite JSON-LD once per page.
src/lib/seo/site.ts Defines cropwatch.io site constants and org identity used by structured data builders.
src/lib/seo/schema.ts Adds schema.org JSON-LD builder functions (Organization, WebSite, BreadcrumbList, Product, etc.).
src/lib/components/JsonLd.svelte New component to serialize JSON-LD into <head> safely.
src/lib/components/Breadcrumbs.svelte Switches breadcrumb JSON-LD emission to the shared builder + <JsonLd>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +15
<svelte:head>
{@html `<script type="application/ld+json">${json}<\/script>`}
</svelte:head>
Comment on lines 23 to 27
export interface Crumb {
label: string;
/** Absolute or root-relative path. Omit on the final (current) crumb. */
href?: string;
}
Comment thread src/lib/seo/schema.ts
Comment on lines +107 to +114
const out: Json = {
'@context': 'https://schema.org',
'@type': 'Product',
name: p.name,
description: p.description,
brand: { '@type': 'Brand', name: 'CropWatch' },
manufacturer: { '@id': ORG_ID }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants