Fix the SEO meta tags on help articles. The og:title is not being set correctly.
I'll investigate the SEO meta tags issue on help articles. Let me start by finding the relevant components.
- hide
pattern: "og:title", path: "components/"
components/SEO/HelpArticleSEO.tsx:14: <meta property="og:title" content={title} />
components/SEO/DefaultSEO.tsx:8: <meta property="og:title" content="Mentorly" />Found it. The HelpArticleSEO component sets og:title but let me check how it receives the title prop.
- hide
file_path: "components/SEO/HelpArticleSEO.tsx"
import Head from 'next/head'
interface Props {
title?: string
description?: string
slug: string
}
export default function HelpArticleSEO({ title, description, slug }: Props) {
return (
<Head>
<title>{title || 'Help'} | Mentorly</title>
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
</Head>
)
}I see the issue. When `title` is undefined, the og:title meta tag renders with `content={undefined}` which browsers ignore entirely. The `<title>` tag has a fallback ("Help") but og:title does not. Let me fix this.
- hide
file: "components/SEO/HelpArticleSEO.tsx"
- <meta property="og:title" content={title} />
+ <meta property="og:title" content={title || "Help | Mentorly"} />File edited successfully.
Fixed. The og:title now falls back to "Help | Mentorly" when no title is provided, matching the behavior of the <title> tag.
Waiting for next prompt...