Missing trailing slash

incompletude
0
incompletude
commented 3 months ago

I have my modules configured this way:

  modules: [
    [
      'nuxt-i18n',
      {
        locales: ['br', 'en'],
        defaultLocale: 'br',
      },
    ],
  ],

Inside my pages I have a path definition:

  nuxtI18n: {
    paths: {
      br: '/empresas/',
      en: '/companies/',
    },
  },

Then I'm using a localePath to generate proper links:

           <nuxt-link class="nav-side-group" v-bind:to="localePath('companies', 'br')">
              <span class="icon">
                <i class="fas fa-store-alt"></i>
              </span>
            </nuxt-link>

The generated link does not contain the trailing slash. Is it possible to solve this? The url example.com/companies should be example.com/companies/.

0
fabsfabs
0
fabsfabs
commented 2 months ago

Same problem here, and more, in the link alternate-hreflang is missing too

<link data-n-head="true" data-hid="alternate-hreflang-en" rel="alternate" href="https://my-website/en/services" hreflang="en">
<link data-n-head="true" data-hid="alternate-hreflang-it" rel="alternate" href="https://my-website/it/servizi" hreflang="it">

the configuration path is

        nuxtI18n: {
            paths: {
              en: '/services/',
              it: '/servizi/',
            }
        },

Any suggestion is appreciated
Many thanks

0
Informations
Question โ€ข Unresolved
#c245 - Created 3 months ago