Skip to content

generateSlug utility is dead code; SEO checker should suggest a corrected slug #117

@mayashavin

Description

@mayashavin

Problem

src/utils/slug.ts exports generateSlug(text: string): string (lines 7–14), but no code in the project imports or calls it. It is dead code.

Additionally, src/tools/review-seo/deterministicSeoChecks.ts detects an invalid slug (line 66–74) and sets severity: 'warning' with a current value, but never sets a suggested value. The user sees the problem but gets no actionable fix.

Expected behaviour

  • generateSlug should be used by runDeterministicSeoChecks to populate the suggested field when a slug is missing or invalid.
  • The optimizeSeoWorkflow already applies suggested values for critical findings — this would extend the same logic to slug suggestions.

Files affected

  • src/tools/review-seo/deterministicSeoChecks.ts
  • src/utils/slug.ts

Example

Missing slug: suggested should be derived from frontmatter.title via generateSlug(frontmatter.title).
Invalid slug: suggested should be the sanitised version of the existing slug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions