Skip to content

fix(seo): keep all meta descriptions within Bing's 25–160 char range#151

Open
bilalahamad0 wants to merge 1 commit into
mainfrom
fix/meta-description-length
Open

fix(seo): keep all meta descriptions within Bing's 25–160 char range#151
bilalahamad0 wants to merge 1 commit into
mainfrom
fix/meta-description-length

Conversation

@bilalahamad0
Copy link
Copy Markdown
Owner

Why

Bing Webmaster Tools (URL Inspection) flagged the homepage <meta name="description"> with "Meta Description too long or too short" — it was 177 chars (Bing's range is 25–160). Sweeping every page surfaced the same defect sitewide.

What changed

Page metadata (trimmed to ≤160):

  • Homepage /177 → 153
  • Sitewide layout default — 181 → 153
  • /certifications169 → 148

Blog posts (guardrail + content):

  • New metaDescription() helper in src/lib/blog.ts clamps any description to ≤160 at a word boundary + ellipsis; wired into the blog post meta/OG/Twitter tags so future posts can't regress.
  • Trimmed all 7 MDX frontmatter descriptions to ≤160 (these double as the visible article subtitles).

Single source of truth for /blog:

  • The /blog list page now reads from getAllPosts() instead of a duplicated hardcoded mdxPosts array. Post content lives only in MDX frontmatter; thumbnail + display date are layered on by slug.

Verification

Page Before After
/ (Bing-flagged) 177 153
layout default 181 153
/certifications 169 148
7 blog posts 162–277 141–154
  • ✅ All 14 prerendered pages now 130–154 chars (measured from rendered HTML).
  • metaDescription() guardrail unit-checked (passes short strings, truncates >160 at word boundary).
  • /blog renders all 7 cards via Playwright against the production build, with the new descriptions; LinkedIn cards + layout intact.
  • npm run build clean · npm run lint 0 errors.

Follow-up

After deploy, use Request indexing in Bing Webmaster Tools for the homepage to clear the flag.

🤖 Generated with Claude Code

Bing Webmaster Tools flagged the homepage <meta name="description"> as
out of range (177 chars). Swept every page and fixed the same defect
sitewide:

- Trim homepage (177→153), sitewide layout default (181→153) and
  /certifications (169→148) meta descriptions.
- Add metaDescription() guardrail in src/lib/blog.ts that clamps any
  description to ≤160 at a word boundary + ellipsis; wire it into the
  blog post meta/OG/Twitter tags so future posts can't regress.
- Trim the 7 MDX frontmatter descriptions to ≤160 (these double as the
  visible article subtitles).
- Drive the /blog list page from getAllPosts() instead of a duplicated
  hardcoded array — post content now has a single source of truth
  (frontmatter); thumbnail + display date are layered on by slug.

Verified: all 14 prerendered pages now 130–154 chars; guardrail
unit-checked; /blog renders all 7 cards (Playwright) with the new
descriptions; build clean, lint 0 errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
resume-site Ready Ready Preview, Comment Jun 4, 2026 9:55am

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

Successfully merging this pull request may close these issues.

1 participant