Skip to content

Commit 1d2fe2e

Browse files
estradinoclaude
andcommitted
seo: prefer per-page metaDescription for meta description tags
~2092 pages set a page-specific metaDescription frontmatter field that HeadSEO.astro ignored, so almost every page shipped the generic site tagline as its meta/og/twitter description. Extend the fallback chain to content.description || content.metaDescription || t('site.description') for both the description/og:description and twitter:description tags. This mirrors the description source already used by the JSON-LD in this PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c40abcb commit 1d2fe2e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/HeadSEO.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const ogLocale = bcpLang.replace(/-/g, '_');
5252
<meta
5353
name="description"
5454
property="og:description"
55-
content={content.description ? content.description : t('site.description')}
55+
content={content.description || content.metaDescription || t('site.description')}
5656
/>
5757
<meta property="og:site_name" content={t('site.title')} />
5858

@@ -62,7 +62,7 @@ const ogLocale = bcpLang.replace(/-/g, '_');
6262
<meta name="twitter:title" content={content.title ?? t('site.title')} />
6363
<meta
6464
name="twitter:description"
65-
content={content.description ? content.description : t('site.description')}
65+
content={content.description || content.metaDescription || t('site.description')}
6666
/>
6767
<meta name="twitter:image" content={canonicalImageSrc} />
6868
<meta name="twitter:image:alt" content={imageAlt} />

0 commit comments

Comments
 (0)