gatsbyjs / themes

This is a repo for Gatsby's official themes.
138 stars 77 forks source link

gatsby-theme-i18n does not honor prefixDefault param in generated alternate links #126

Open olivier-lacroix opened 3 years ago

olivier-lacroix commented 3 years ago

Hello there,

The alternate link for the default locale is always generated without prefix, irrespective of the prefixDefault parameter.

ie, with prefixDefault set to true, the theme generates

    <link data-react-helmet="true" rel="alternate" hrefLang="en" href="https://www.domain.com/about/" />
    <link data-react-helmet="true" rel="alternate" hrefLang="fr" href="https://www.domain.com/fr/about/" />

instead of

    <link data-react-helmet="true" rel="alternate" hrefLang="en" href="https://www.domain.com/en/about/" />
    <link data-react-helmet="true" rel="alternate" hrefLang="fr" href="https://www.domain.com/fr/about/" />