Skip to content

fix(seo): JSON-LD validation and consistency patches#18011

Merged
wackerow merged 9 commits into
devfrom
jsonld-patches
Apr 22, 2026
Merged

fix(seo): JSON-LD validation and consistency patches#18011
wackerow merged 9 commits into
devfrom
jsonld-patches

Conversation

@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow commented Apr 21, 2026

Summary

Four JSON-LD fixes packaged together.

Changes

  • Correct reviewedBy domain. Per schema.org, reviewedBy is valid only on WebPage and its subtypes. Swapped to editor on Article and VideoObject nodes (both CreativeWork), and removed from ItemList nodes (no equivalent property applies). (Edit: editor does not accept Organization type, only Person -- has been removed)

  • Drop /en/ prefix from JSON-LD URLs. Hardcoded https://ethereum.org/${locale}/... URLs now route through normalizeUrlForJsonLd, which respects localePrefix: "as-needed" (no prefix for the default locale).

  • Extract /staking/deposit-contract/ JSON-LD to a sibling file. Previously inline inside the React component; now follows the standard page-jsonld.tsx pattern alongside every other route. Uses the canonical EF/Community organization entities instead of a bogus inline "ethereum.org" Organization.

  • DRY common @graph entities. Extracts the ethereum.org WebSite entity and the trio of top-level graph nodes (EF Organization, Community Organization, WebSite) into shared constants. Each page now spreads ...baseGraphNodes instead of repeating them, and references the WebSite via @id in isPartOf.

Note

Parallel to the author attribution work in:

Both touch src/lib/utils/jsonld.ts and many page-jsonld.tsx files but are not dependent -- whichever lands first, the other will need a merge resolution.


Generated by Claude Opus 4.7

myelinated-wackerow and others added 5 commits April 20, 2026 13:52
Replaces hardcoded https://ethereum.org/${locale}/... URLs with
normalizeUrlForJsonLd(), which respects localePrefix "as-needed"
(no prefix for the default locale).

Affects breadcrumb items in the catch-all MDX route and the
deposit-contract component's inline JSON-LD.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Moves the inline JSON-LD out of the React component and into a
standard page-jsonld.tsx file alongside the route, matching the
pattern used by every other page.

Rewrites the schema to reflect the page's actual nature:
- Single WebPage node (was WebPage + Article)
- Uses ethereumFoundationOrganization / Community org entities
  instead of an inline "ethereum.org" Organization
- No contributor or author attribution (page is a canonical
  reference, not collaboratively authored content shown with
  FileContributors)
- `about` Thing kept under the WebPage

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Extracts the ethereum.org WebSite entity and the common trio of
top-level graph nodes (EF Organization, Community Organization,
WebSite) into shared constants:

- ethereumOrgWebSite / ethereumOrgWebSiteReference
- baseGraphNodes (the three entities every page's @graph includes)

Each page's JSON-LD now spreads ...baseGraphNodes at the top of its
@graph instead of repeating the three imports, and references the
WebSite via ethereumOrgWebSiteReference in isPartOf instead of
inlining the full object.

Also consolidates the videos index page's inline publisher/reviewedBy
full-org objects to their @id references, matching the site-wide
pattern.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Per schema.org, reviewedBy is valid only on WebPage (and subtypes).
Applies across the site:

- Keep on WebPage / CollectionPage / FAQPage / AboutPage nodes
- Swap to `editor` on Article and VideoObject nodes (both extend
  CreativeWork, where `editor` is valid)
- Remove from ItemList nodes entirely (extends Intangible; neither
  reviewedBy nor editor applies)

Total: 19 swaps, 6 removals across 25 files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 9c33555
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69e8fcb84809630008607200
😎 Deploy Preview https://deploy-preview-18011.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 60 (🟢 up 2 from production)
Accessibility: 93 (no change from production)
Best Practices: 100 (no change from production)
SEO: 97 (🔴 down 2 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the tooling 🔧 Changes related to tooling of the project label Apr 21, 2026
myelinated-wackerow and others added 2 commits April 21, 2026 16:38
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
`editor` on CreativeWork has rangeIncludes: Person only, so using
an Organization reference (EF) there is invalid per schema.org.

The institutional "EF oversees this" signal is already conveyed by
the containing WebPage's reviewedBy and the node's own publisher.
Drop the third, invalid attribution rather than fabricate a Person
or misuse a different property.

Reverts the editor-swap portion of commit 1b1166e; keeps the
reviewedBy removals on ItemList and the reviewedBy cleanup on
WebPage-subtype nodes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Copy link
Copy Markdown
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@myelinated-wackerow nice cleanup

Blockers / needs clarification

  1. PR description vs. diff mismatch on editor. The summary says reviewedBy was "swapped to editor on Article and VideoObject nodes," but I can't find a single editor: insertion in the diff — reviewedBy is simply removed from those nodes.
  2. deposit-contract/page-jsonld.tsx drops the Article node. Every other extracted page emits both a WebPage and an Article; this new file emits only a WebPage.

Nit

  1. app/[locale]/staking/deposit-contract/page-jsonld.tsx doesn't thread contributors through, so the WebPage lacks the contributor array the other extracted pages carry. Easy parity win now that it's a proper sibling file.

myelinated-wackerow and others added 2 commits April 22, 2026 09:28
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@mnelsonBT mnelsonBT left a comment

Choose a reason for hiding this comment

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

LGTM @wackerow , love seeing these graphs in tight shape! Defer to your call on the deposit contract page; I'm aligned with keeping that one clean as it's a core source for the contract.

Copy link
Copy Markdown
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Thanks @pettinarip!

  1. PR description vs. diff mismatch on editor. The summary says reviewedBy was "swapped to editor on Article and VideoObject nodes," but I can't find a single editor: insertion in the diff — reviewedBy is simply removed from those nodes.

Good catch, this was updated after the PR was posted—I've updated the PR description. Schema.org requires editor to be a Person not an Organization so this has been removed. The reviewedBy remains inconsistent with Article, so remains removed as well.

  1. deposit-contract/page-jsonld.tsx drops the Article node. Every other extracted page emits both a WebPage and an Article; this new file emits only a WebPage.

This page isn't actually an article so semantically correct to leave off Article type for this page (likely others we could fine-tune as we keep iterating on this) cc: @mnelsonBT

  1. app/[locale]/staking/deposit-contract/page-jsonld.tsx doesn't thread contributors through, so the WebPage lacks the contributor array the other extracted pages carry. Easy parity win now that it's a proper sibling file.

Similarly, this page is one that doesn't really accept contributors (no FileContributors component nor "Edit" button) given the nature of this page, so was intentionally kept off.


This refactor causes breaking changes for the Authors changes in PR #17988 so I'm going to pull this in and update the other changes from there.

Thanks folks!

@wackerow wackerow merged commit f027e11 into dev Apr 22, 2026
10 checks passed
@wackerow wackerow deleted the jsonld-patches branch April 22, 2026 18:19
@wackerow wackerow mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants