fix(seo): add recommended licensing fields to ImageObject JSON-LD - #10537
Conversation
Search Console flagged every implementation page's ImageObject for four missing recommended fields of the image-metadata rich result: creator, copyrightNotice, creditText, and acquireLicensePage. The bot-page SoftwareSourceCode image node now carries all four beside the existing license field, with /legal (the page stating the MIT terms) as the acquire-license page. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzepMnRdGbhmH7kdUyMukG
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HzepMnRdGbhmH7kdUyMukG
There was a problem hiding this comment.
🟢 Approval recommended
The JSON-LD changes are narrowly scoped, consistent with existing structured-data patterns in the file, and covered by a focused regression test plus a changelog entry.
Pull request overview
This PR updates the bot-facing JSON-LD emitted by api/routers/seo.py so the ImageObject inside the SoftwareSourceCode graph includes the four Google-recommended image licensing/attribution fields (creator, copyrightNotice, creditText, acquireLicensePage) that Search Console flagged as missing across implementation pages.
Changes:
- Add the four recommended licensing fields to the
ImageObjectJSON-LD for implementation renders (alongside the existinglicense). - Add a unit regression test asserting the new licensing fields are present on the JSON-LD image node.
- Add a
[Unreleased]changelog entry documenting the structured data fix.
File summaries
| File | Description |
|---|---|
api/routers/seo.py |
Enriches the ImageObject JSON-LD for implementation-page renders with recommended licensing/credit metadata. |
tests/unit/api/test_seo_helpers.py |
Adds a regression test ensuring the ImageObject carries the new licensing fields. |
CHANGELOG.md |
Documents the fix under [Unreleased] -> Fixed following existing changelog conventions. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Fixes the 4 Image Metadata structured data issues Search Console reported for anyplot.ai (missing
creator,copyrightNotice,creditText,acquireLicensePage).Summary
ImageObjectinside theSoftwareSourceCodeJSON-LD thatapi/routers/seo.pyrenders on every bot-facing implementation page (the onlyImageObjectthe site emits — the four Search Console issues map one-to-one to its four missing recommended fields).license:creator(the same anyplot Organization node the graph already uses forauthor),creditText(anyplot.ai),copyrightNotice(© anyplot.ai — MIT License), andacquireLicensePagepointing tohttps://anyplot.ai/legal, the page that states the MIT terms the renders are offered under.Test plan
/verify-coregates on the touched files:pytest tests/unit/api/test_seo_helpers.py(62 passed, including the newtest_jsonld_image_carries_licensing_metadata),ruff check,ruff format --check,mypy api/routers/seo.py— all clean./scatter-basic/python/matplotlib) with Google's Rich Results Test as a bot user agent, then use "Validate fix" in Search Console.Checklist
CHANGELOG.mdupdated under[Unreleased]→### FixedGenerated by Claude Code