Skip to content

Refine OG title handling in SEO configuration - #1

Closed
yohaann196 wants to merge 1 commit into
mainfrom
yohaann196-patch-1
Closed

yohaann196 wants to merge 1 commit into
mainfrom
yohaann196-patch-1

Conversation

@yohaann196

Copy link
Copy Markdown
Owner

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.

Updated ogTitle to use pageTitle directly instead of fullTitle.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.ogTitle documentation to indicate it should be the page title without a site-name suffix.
  • Simplifies getSeoMeta() to return ogTitle: pageTitle instead of pageTitle || 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) */

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
/** OG title (page title only, without site name suffix) */
/** OG title (page title before appending any site title suffix) */

Copilot uses AI. Check for mistakes.
Comment on lines 140 to 144
return {
title: fullTitle,
description,
ogTitle: pageTitle || fullTitle,
ogTitle: pageTitle,
ogDescription: description,

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
@yohaann196

Copy link
Copy Markdown
Owner Author

ok, mb

@yohaann196 yohaann196 closed this Apr 4, 2026
ascorbic added a commit that referenced this pull request Apr 11, 2026
* 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]>
ascorbic added a commit that referenced this pull request Apr 11, 2026
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]>
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