Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding organization structured data json #2623

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

hellofanny
Copy link
Contributor

@hellofanny hellofanny commented Jan 23, 2025

What's the purpose of this pull request?

Adding organization structured data to your home page can help Google better understand your organization's administrative details and disambiguate your organization in search results.

How it works?

Allow adding the following Organization schema proprieties:

  • url: the URL of the website of your organization, if applicable. This helps Google uniquely identify your organization.
  • sameAs: The URL of a page on another website with additional information about your organization, if applicable. For example, a URL to your organization's profile page on a social media or review site. You can provide multiple sameAs URLs.
  • logo: A logo that is representative of your organization, if applicable. (image guidelines)
  • name: The name of your organization.
  • legalName: The registered, legal name of your Organization.
  • email: The email address to contact your business, if applicable.
  • telephone: A business phone number meant to be the primary contact method for customers, if applicable.

Users can add data either through the headless CMS interface or by editing the discovery.config.js file.

Note: Data from the headless CMS takes precedence over data from discovery.config.js.

Headless CMS

image

discovery.config.js

module.exports = {
  seo: {
    title: "FastStore Starter",
    description: "Fast Demo Store",
    titleTemplate: "%s | FastStore",
    author: "FastStore",
    organization: {
      url: 'https://vtex.com',
      sameAs: [
        'https://www.facebook.com/vtex',
        'https://www.instagram.com/vtex',
      ],
      logo: 'https://vtex.com/_next/static/media/vtex-logo.80485bcf.svg',
      name: 'VTEX',
      legalName: 'VTEX Commerce',
      email: '[email protected]',
      telephone: '',
  },
  ...
};

TODO: Run cms sync in default acc.

How to test it?

  1. Go to preview link, inspect and look for Organization
image
  1. Copy the generated script and paste here - google rich test to test the valid schema:
image

OR

  1. Test in storeframework account, go to CMS admin, changes the fields values -> Save and Publish.
  2. Wait for the new preview link and do the same process mention above (look for organization and validate the schema)

Starters Deploy Preview

vtex-sites/starter.store#655

References

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview Feb 1, 2025 0:14am

Copy link

codesandbox-ci bot commented Jan 23, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@hellofanny hellofanny changed the title chore: Testing organization json feat: Adding organization structure data json Jan 25, 2025
@hellofanny hellofanny changed the title feat: Adding organization structure data json feat: Adding organization structured data json Jan 25, 2025
@hellofanny hellofanny marked this pull request as ready for review January 27, 2025 13:32
@hellofanny hellofanny requested a review from a team as a code owner January 27, 2025 13:32
@hellofanny hellofanny requested review from lariciamota and pedromtec and removed request for a team January 27, 2025 13:32
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