jekyll/jekyll-seo-tag

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

hakanai opened this issue · 0 comments

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.