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

Tags are not changing when browsing the site with Next JS 13 #1103

Closed
BWBama85 opened this issue Nov 16, 2022 · 2 comments
Closed

Tags are not changing when browsing the site with Next JS 13 #1103

BWBama85 opened this issue Nov 16, 2022 · 2 comments

Comments

@BWBama85
Copy link

Describe the bug
I have just started using Next SEO so hopefully I haven't just missed something completely obvious.

I Next SEO setup the following way:

next-seo.config.ts

// next-seo.config.ts
import type { NextSeoProps } from 'next-seo';

export const NEXT_SEO_DEFAULT: NextSeoProps = {
  title: 'The Wilson Net built by Brent Wilson',
  description:
    'The Wilson Net is a place for Brent Wilson to showcase his life.',
  openGraph: {
    type: 'website',
    locale: 'en_IE',
    url: 'https://www.thewilsonnet.com',
    title: 'The Wilson Net built by Brent Wilson',
    description:
      'The Wilson Net is a place for Brent Wilson to showcase his life.',
    images: [
      {
        url: 'https://www.test.ie/og-image-a-01.jpg',
        width: 800,
        height: 600,
        alt: 'Og Image Alt A',
        type: 'image/jpeg',
        secureUrl: 'https://www.test.ie/secure-og-image-a-01.jpg',
      },
    ],
    siteName: 'The Wilson Net',
  },
  twitter: {
    handle: '@brentwilson85',
    cardType: 'summary_large_image',
  },
};

layout.tsx

      <head>
        <meta charSet="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="icon" href="/favicon.ico" />
        <NextSeo
          useAppDir={true}
          titleTemplate="%s"
        />
      </head>

head.tsx for root (homepage)

import { NextSeo } from 'next-seo';
import { NEXT_SEO_DEFAULT } from './next-seo.config';
import type { NextSeoProps } from 'next-seo';

export default function Head() {
  const updateMeta: NextSeoProps = {
    ...NEXT_SEO_DEFAULT,
    title: 'The Wilson Net by Brent Wilson',
    description: 'The Wilson Net is a place for Brent Wilson to showcase his life.',
    titleTemplate: '%s',
  };
  return (
    <NextSeo {...updateMeta} useAppDir={true} />
  )
}

head.tsx for /resume

import { NextSeo } from 'next-seo';
import { NEXT_SEO_DEFAULT } from '../../next-seo.config';
import type { NextSeoProps } from 'next-seo';

export default function Head() {
  const updateMeta: NextSeoProps = {
    ...NEXT_SEO_DEFAULT,
    title: 'Richard Brent Wilson\'s Resume',
    description: 'A detailed resume for Richard Brent Wilson',
    titleTemplate: '%s',
  };
  return (
    <NextSeo {...updateMeta} useAppDir={true} />
  )
}

Reproduction
The site is live here and you can click around and see that the title tag and meta desc does not change.

https://thewilsonnet.com/

Expected behavior
The title and desc should update to reflect what page you are on.

Additional context
Add any other context about the problem here.

@BWBama85
Copy link
Author

BWBama85 commented Nov 16, 2022

I'm sorry, I missed the first line in the app readme. Somehow...

Edit: It looks like this might be getting close to being fixed in the latest canary: vercel/next.js#42791 and latest commit vercel/next.js@e6a7d78

@BWBama85
Copy link
Author

This is fixed in Next 13.0.4 if you want to update the docs.

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

1 participant