untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
417 stars 60 forks source link

fix: Default language should use the similar url pattern with other l… #211

Closed blackpill closed 3 months ago

blackpill commented 3 months ago

…anguages

🔤 Polyglot PR

If the permalink of a page is assigned to '/xxx', the hreflang for other languages are wrong, like If the permalink of a page is assigned to 'xxx/', the hreflang for default_lang is wrong. We can see the bug from the source code of https://polyglot.untra.io/seo/.

This href url is wrong. <link rel="alternate" hreflang="en" href="https://polyglot.untra.ioseo/"/>

We should add a slash for the default language in the template.

add a sweet (optional) meme

Type of change

untra commented 3 months ago

nice catch, thank you for the contribution! I'll try and get an i18n_headers test spec implemented.