Skip to content

Canonical URL comes out with two slashes if the site URL ends in a slash #500

@hakanai

Description

@hakanai

My site URL was configured like so:

url: https://mysite.name/

Which is a pretty conventional to write it; it always feels wrong omitting the slash.

But then in the generated metadata, I get two slashes on the end:

<link rel="canonical" href="https://mysite.name//" />

And similarly for child pages:

<link rel="canonical" href="https://mysite.name//principles/" />

I know I can probably remove my slash to work around this, but it would be nice if URL joining would collapse the double slashes automatically.

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