Skip to content

fix SEO category title with slug fallback#101

Open
persd wants to merge 5 commits intoastrofrom
fix/seo-category-title-with-slug-fallback
Open

fix SEO category title with slug fallback#101
persd wants to merge 5 commits intoastrofrom
fix/seo-category-title-with-slug-fallback

Conversation

@persd
Copy link
Contributor

@persd persd commented Feb 4, 2026

No description provided.

@persd persd requested a review from Copilot February 4, 2026 14:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the SEO category title generation by adding a fallback mechanism that uses the slug when the category name is not available. The change extracts duplicated slug-to-title formatting logic into a reusable helper function.

Changes:

  • Added UtilsHelper_formatSlugToTitle function to centralize slug-to-title conversion logic
  • Modified getCategoryName to return formatted slug when category name is unavailable
  • Refactored existing slug formatting code to use the new helper function

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/helpers/seo/SeoTitleHelper.ts Added slug field to GraphQL query and implemented fallback logic to use formatted slug when category name is missing
src/helpers/UtilsHelper.ts Extracted slug-to-title formatting logic into a new reusable helper function and refactored existing code to use it
package.json Bumped version from 4.6.2 to 4.6.3

@persd persd requested a review from Copilot February 5, 2026 15:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

export function UtilsHelper_formatSlugToTitle(slug: string): string {
if (!slug) return '';
const formattedSlug = slug.replaceAll('-', ' ');
return formattedSlug.charAt(0).toUpperCase() + formattedSlug.slice(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

mamy juz do slugowania: UtilsHelper_slugify

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.

3 participants