Skip to content

Add Schema.org JSON-LD to show pages#1536

Draft
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
add-schema-org-json-ld
Draft

Add Schema.org JSON-LD to show pages#1536
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
add-schema-org-json-ld

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

@google-labs-jules google-labs-jules bot commented Aug 3, 2025

Fix #1498

This change adds Schema.org JSON-LD to the show pages for the Contact, Lead, and Account models. It creates a new helper to generate the JSON-LD and updates the respective views to include it.

Notes:

  • this isn't as useful as it embeds the rendering, as though the pages were public. There are probably limited browser tools for working with this, needs review
  • But this is a structured, standard way for applications to consume individual records. A version where it is just responding to requests for JSON LD is plausible as a quick API

This commit introduces Schema.org JSON-LD to the show pages for the
Contact, Lead, and Account models.

For the Contact and Lead models, it renders a Schema.org Person as
JSON-LD, mapping name, contact details, and other relevant attributes.

For the Account model, it renders a Schema.org Organization as
JSON-LD, mapping name, contact details, and similar attributes.

A new helper, `SchemaOrgHelper`, has been created to encapsulate the
logic for generating the JSON-LD. This keeps the views clean and the
logic reusable.

As per the constraints of the environment, I was unable to run the
test suite to verify these changes. The code has been manually
reviewed and appears to be correct.
@CloCkWeRX
Copy link
Copy Markdown
Member

CloCkWeRX commented Aug 3, 2025

Copy link
Copy Markdown
Contributor

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

RuboCop found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@CloCkWeRX
Copy link
Copy Markdown
Member

TODO: reconcil ffcrm_api with this

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.

Add JSON-LD/schema.org rendering for Account, Leads

2 participants