1

Hi I am trying to add multiple localbusiness schema in my next js application, I am using next-seo package for this

import { LocalBusinessJsonLd } from 'next-seo'

{locations.map((location) => (
    <LocalBusinessJsonLd 
      type="Store"
      name={location.node.name}
      description={location.node.description}
      telephone={location.node.phone}
      address={{
        streetAddress: `${location.node.street}`,
        addressLocality: `${location.node.city}`,
        postalCode: `${location.node.postalCode}`,
        addressCountry: `${location.node.countryIso}`,
      }}
    />
))}

But when I did inspect its showing only last location in the schema not array of schema

1 Answer 1

0

This part of the documentation might help you: next-seo - Handling multiple instances

If your page requires multiple instances of a given JSON-LD component, you can specify unique keyOverride properties, and next-seo will handle the rest.
This comes in handy for blog rolls, search results, and overview pages.
Please fully research when you should and shouldn't add multiple instances of JSON-LD.

<ExampleJsonLd keyOverride="my-new-key" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.