Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hakanai opened this issue Feb 7, 2024 · 0 comments
Open

Comments

@hakanai
Copy link

hakanai commented Feb 7, 2024

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.

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

No branches or pull requests

1 participant