Skip to content

perfixLink should add any required trailing slashes #855

@danielo515

Description

@danielo515

Hello,

I expect the helper function prefixLink to generate valid links, no matter what I throw to it.

For example, I expect the following to work

 <Link to={prefixLink('somesection')}>
                           BlaBLa
   </Link>

But it does not. I'm forced to do it like this:

 <Link to={prefixLink('somesection/')}>
                           BlaBLa
   </Link>

Please note the trailinig / at the end of somesection
Not a big deal, but a bit annoying. I didn't noticed this before because 99% of my links are generated automatically from gatsby metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions