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

Bug: <DefaultSeo /> OG image does not get added to pages with <NextSEO/> #1279

Open
JakeSchroeder opened this issue Jul 18, 2023 · 2 comments

Comments

@JakeSchroeder
Copy link

JakeSchroeder commented Jul 18, 2023

I would expect by using Default NextSEO like the docs say:

_app.tsx
...
<DefaultSeo
        openGraph={{
          type: 'website',
          locale: 'en_US',
          images: [{ url: https://mywebsite.com/social-card-main.png }],
        }}
 />      

Would populate pages that implement without the OG Image

about.tsx
...

<NextSEO
        title="About - My Website"
        description="My cool website"
        canonical="https:/mywebsite/about"
/>

But it doesn't work. In other words, wherever you merge the props you should only override used props and not unused like og image in this case. Now I have to explicitly set each pages og image.

@qnrjs42
Copy link

qnrjs42 commented Jul 26, 2023

same issue

"next-seo": "^6.1.0"

@andrekutianski
Copy link

I would expect by using Default NextSEO like the docs say:

_app.tsx
...
<DefaultSeo
        openGraph={{
          type: 'website',
          locale: 'en_US',
          images: [{ url: https://mywebsite.com/social-card-main.png }],
        }}
 />      

Would populate pages that implement without the OG Image

about.tsx
...

<NextSEO
        title="About - My Website"
        description="My cool website"
        canonical="https:/mywebsite/about"
/>

But it doesn't work. In other words, wherever you merge the props you should only override used props and not unused like og image in this case. Now I have to explicitly set each pages og image.

This occurs with any default props. I believe that this override (and some cases overrides by NextJS like #1134 ) is due to where you define the DefaultSEO.

Documentation shows an old way to declare a custom container to wrap an app with SEO.

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

No branches or pull requests

3 participants