Repository navigation
Refine OG title handling in SEO configuration - #1
yohaann196 wants to merge 1 commit into
Conversation
Updated ogTitle to use pageTitle directly instead of fullTitle.
There was a problem hiding this comment.
Pull request overview
Adjusts how og:title is derived in the getSeoMeta helper so Open Graph titles align with platform conventions (site name handled separately via og:site_name) and clarifies the intended behavior in the type documentation.
Changes:
- Updates
SeoMeta.ogTitledocumentation to indicate it should be the page title without a site-name suffix. - Simplifies
getSeoMeta()to returnogTitle: pageTitleinstead ofpageTitle || fullTitle.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** Meta description */ | ||
| description: string | null; | ||
| /** OG title (same as title by default) */ | ||
| /** OG title (page title only, without site name suffix) */ |
There was a problem hiding this comment.
The updated docstring says ogTitle is the page title “without site name suffix”, but getSeoMeta does not actually strip anything from the underlying SEO/content title; it only avoids adding the siteTitle suffix when constructing fullTitle. Consider rewording to clarify that ogTitle uses the unsuffixed pageTitle (before appending siteTitle), rather than claiming suffix removal in general.
| /** OG title (page title only, without site name suffix) */ | |
| /** OG title (page title before appending any site title suffix) */ |
| return { | ||
| title: fullTitle, | ||
| description, | ||
| ogTitle: pageTitle || fullTitle, | ||
| ogTitle: pageTitle, | ||
| ogDescription: description, |
There was a problem hiding this comment.
This change appears to be behavior-neutral: previously ogTitle was pageTitle || fullTitle, and fullTitle only adds the siteTitle suffix when pageTitle is truthy, so ogTitle would already resolve to the unsuffixed pageTitle in all cases. If the reported issue is that og:title includes the site name suffix somewhere in the product, it may be happening in a different code path than getSeoMeta (or the PR description may need adjusting).
|
ok, mb |
* Add OG Image field to content editor The `_emdash_seo` table and content API already support `seo_image`, but the admin UI had no way to set it. This adds: - `SeoImageField` component using the existing `MediaPickerModal` - 2-column grid layout placing the OG Image next to the Featured Image - `description` prop on `ImageFieldRenderer` for helper text below images - Preserve `seo.image` in `SeoPanel.emitChange` so sidebar edits don't clear the image Closes emdash-cms#327 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * style: format * Add changeset and fix stale seo.image in SeoPanel - Add changeset for @emdash-cms/admin patch release - Remove image from SeoPanel.emitChange to avoid overwriting a freshly-selected OG image with a stale prop value Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * Address review feedback on OG Image field - Fix #1: Use @phosphor-icons/react instead of lucide-react - Fix #2: Send minimal patch { image } instead of spreading stale seo props - Fix emdash-cms#3: Only show OG Image next to the featured_image field, not all image fields - Fix emdash-cms#4: Only add description text for the featured_image field - Fix emdash-cms#5: Add responsive breakpoint (grid-cols-1 md:grid-cols-2) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * style: format --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]> Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com> Co-authored-by: Matt Kane <[email protected]>
Bumps [ask-bonk/ask-bonk](https://github.com/ask-bonk/ask-bonk) from c39e982defd0114385df54e72012a3fc4333c4d4 to 5704e1685d6efc3951efb9166a8bd17a9ca28509. - [Release notes](https://github.com/ask-bonk/ask-bonk/releases) - [Commits](Cloudflare-Studio/ask-bonk@c39e982...5704e16) --- updated-dependencies: - dependency-name: ask-bonk/ask-bonk dependency-version: 5704e1685d6efc3951efb9166a8bd17a9ca28509 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matt Kane <[email protected]>
fix: remove site name suffix from og:title
og:title should contain only the page title. Social platforms that
display og:site_name already show the site name separately, making
the suffix redundant. The <title> tag (for browser tabs/SEO) is
unaffected and still includes the site name.