fix(seo): keep all meta descriptions within Bing's 25–160 char range#151
Open
bilalahamad0 wants to merge 1 commit into
Open
fix(seo): keep all meta descriptions within Bing's 25–160 char range#151bilalahamad0 wants to merge 1 commit into
bilalahamad0 wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
/— 177 → 153/certifications— 169 → 148Blog posts (guardrail + content):
metaDescription()helper insrc/lib/blog.tsclamps any description to ≤160 at a word boundary + ellipsis; wired into the blog post meta/OG/Twitter tags so future posts can't regress.Single source of truth for
/blog:/bloglist page now reads fromgetAllPosts()instead of a duplicated hardcodedmdxPostsarray. Post content lives only in MDX frontmatter; thumbnail + display date are layered on by slug.Verification
/(Bing-flagged)/certificationsmetaDescription()guardrail unit-checked (passes short strings, truncates >160 at word boundary)./blogrenders all 7 cards via Playwright against the production build, with the new descriptions; LinkedIn cards + layout intact.npm run buildclean ·npm run lint0 errors.Follow-up
After deploy, use Request indexing in Bing Webmaster Tools for the homepage to clear the flag.
🤖 Generated with Claude Code