birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

shortenUrlLangs doesn't work #215

Closed kossowski closed 4 years ago

kossowski commented 4 years ago

Hej, I tried the option shortenUrlLangs for my multiple language site, but it seems that it doesn't change anything.

gatsby-config:

{
      resolve: "gatsby-source-prismic-graphql",
      options: {
        repositoryName: "..."
        defaultLang: "de-de",
        langs: ["de-de", "en-gb"],
        shortenUrlLangs: true,
        accessToken: `${process.env.API_KEY}`,
        previews: true, 
        path: "/preview",
        pages: [
          {
            type: "Homepage",
            match: "/:lang?/",
            path: "/preview-homepage",
            component: require.resolve("./src/templates/home.tsx"),
          },
          {...},
]
}

I cleaned the project cache with gatsby clean multiple times. The url has still the prefix "/en-gb/" and not "/en". No Error Messages, no changes in the query.

Is there something I overlook?

kossowski commented 4 years ago

Solved: Update from 3.4.0-beta.2 to 3.6.2 and it works now!