Skip to content

fix: fallback to site description for pages without description#149

Merged
rsbh merged 1 commit into
mainfrom
fix/meta-description-fallback
Jun 4, 2026
Merged

fix: fallback to site description for pages without description#149
rsbh merged 1 commit into
mainfrom
fix/meta-description-fallback

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented Jun 4, 2026

Summary

  • Pages without description in frontmatter now fallback to config.site.description
  • Applies to <meta name="description">, og:description, and twitter:description
  • One-line change in Head component

Test plan

  • All 180 tests pass
  • Pages without frontmatter description get site-level description in meta tags

🤖 Generated with Claude Code

Pages without frontmatter description now use config.site.description
for meta description, og:description, and twitter:description tags.

Co-Authored-By: Claude Opus 4.6 (1M context) <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)
chronicle Ready Ready Preview, Comment Jun 4, 2026 8:15am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1fff9025-a6cd-428f-91bd-4958306647aa

📥 Commits

Reviewing files that changed from the base of the PR and between b1f6a10 and eed6dc6.

📒 Files selected for processing (1)
  • packages/chronicle/src/lib/head.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Pages without an explicit description now automatically display the site's default description, preventing missing description metadata.

Walkthrough

In Head, the description prop is now destructured as pageDescription with a fallback to config.site.description for the actual meta/OG/Twitter description fields when no page-specific description is provided.

Changes

Description Fallback Mechanism

Layer / File(s) Summary
Head component description fallback
packages/chronicle/src/lib/head.tsx
Head component destructures the incoming description prop as pageDescription and derives a local description value using a fallback to config.site.description, which is then used for meta/OG/Twitter tags.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing a fallback to site description for pages missing individual descriptions.
Description check ✅ Passed The description is clearly related to the changeset, explaining the fallback behavior for descriptions and referencing the affected meta tags and component.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/meta-description-fallback

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@mahakmakharia mahakmakharia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rsbh rsbh merged commit b66e9b4 into main Jun 4, 2026
9 checks passed
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.

2 participants