Skip to content

CE: JSON-LD structured data for SERP rich results + AI crawlers#316

Merged
ericflo merged 1 commit intomainfrom
ce/json-ld-structured-data
Apr 16, 2026
Merged

CE: JSON-LD structured data for SERP rich results + AI crawlers#316
ericflo merged 1 commit intomainfrom
ce/json-ld-structured-data

Conversation

@ericflo
Copy link
Copy Markdown
Owner

@ericflo ericflo commented Apr 16, 2026

What

Add JSON-LD structured data so search engines (Google rich snippets, Knowledge Graph) and AI crawlers (ChatGPT browsing, Perplexity) can properly understand ModelRelay.

  • crates/modelrelay-web/src/templates.rspage_shell_custom now renders an Organization JSON-LD script on every page it shells (dashboard, legal, integrate, setup, etc).
  • crates/modelrelay-cloud/templates/index.html — landing page (served as static HTML, not via page_shell) gets both Organization and SoftwareApplication schemas.
  • crates/modelrelay-cloud/templates/pricing.html — pricing page (also static) gets Organization schema.

Why

Verified gap before this PR: zero application/ld+json blocks on live site (curl -s https://modelrelay.io/ | grep -c ld+json returned 0 for both / and /pricing). JSON-LD enables SERP rich snippets, Knowledge Graph association, and AI crawler metadata extraction.

Note on implementation: the landing and pricing pages are served as static HTML strings (LANDING_HTML / PRICING_HTML), not through page_shell. So the Organization schema had to be added directly to those two static templates to hit the live-site validation targets. page_shell-shelled pages (dashboard, legal, setup, integrate, etc.) pick it up automatically through the page_shell_custom change.

Validation

  • Added templates::tests::page_shell_includes_organization_jsonld which renders page_shell and asserts the Organization JSON-LD is present.
  • cargo test -p modelrelay-web --lib → 1 passed.
  • cargo test -p modelrelay-cloud --lib → 38 passed.
  • cargo fmt --check → clean.
  • cargo clippy -p modelrelay-web -p modelrelay-cloud --all-targets -- -D warnings → clean.
  • Python json.loads confirms all rendered JSON-LD blocks parse as valid JSON (no format! brace-escape bugs).

Post-deploy:

  • curl -s https://modelrelay.io/ | grep -c application/ld+json → expect 2 (Organization + SoftwareApplication)
  • curl -s https://modelrelay.io/pricing | grep -c application/ld+json → expect 1 (Organization)

@ericflo ericflo merged commit 1246995 into main Apr 16, 2026
12 checks passed
@ericflo ericflo deleted the ce/json-ld-structured-data branch April 16, 2026 22:01
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.

1 participant