Skip to content

gatsby-theme-i18n adds trailing slash even if trailingSlash is set to never #169

Description

@gugu

Expected behaviour for location / and trailingSlash=never:

<link data-react-helmet="true" rel="alternate" hrefLang="x-default" href="https://short.io/"/>
<link data-react-helmet="true" rel="alternate" hrefLang="ru" href="https://short.io/zh"/> <!-- current -->
<link data-react-helmet="true" rel="alternate" hrefLang="en-US" href="https://short.io/"/>
<link data-react-helmet="true" rel="alternate" hrefLang="ja" href="https://short.io/ja"/>
<link data-react-helmet="true" rel="alternate" hrefLang="de" href="https://short.io/de"/>

current behaviour:

<link data-react-helmet="true" rel="alternate" hrefLang="x-default" href="https://short.io/"/>
<link data-react-helmet="true" rel="alternate" hrefLang="ru" href="https://short.io/zh"/> <!-- current -->
<link data-react-helmet="true" rel="alternate" hrefLang="en-US" href="https://short.io/"/>
<link data-react-helmet="true" rel="alternate" hrefLang="ja" href="https://short.io/ja/"/> <!-- extra slash -->
<link data-react-helmet="true" rel="alternate" hrefLang="de" href="https://short.io/de/"/> <!-- extra slash -->
...

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