Skip to content

[BUG]: dashes around numbers in URLs for tags #584

@gavvvr

Description

@gavvvr

Describe the bug
Hi. Cool template! I'm about to start my technical blog and I'm writing an article about E2E testing. I would like to add "E2E testing" tag, but the generated URL path becomes: e-2-e-testing

To Reproduce
Steps to reproduce the behavior:

  1. Create new or edit existing blog post, add the following tag:
tags:
  - E2E testing
  1. Go to /tags
  2. Click on "E2E testing"
  3. You will see /e-2-e-testing in URL

Expected behavior
I would expected to see e2e-testing in URL. I've tried to create the same tag using AstroWind template and got expected URL. AstroWind is using limax package.

Additional context

lodash.kebabcase is probably not the right tool to slugify tags:

import kebabcase from "lodash.kebabcase";
export const slugifyStr = (str: string) => kebabcase(str);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions