Skip to content

Feature request: Generated paths should follow the i18n custom route paths (config and macro) #145

Open
@timothejoubert

Description

@timothejoubert

Thank you for taking the time to fill out this feature request!

Description

The generated output should follow the i18n custom path set in i18n config.
https://stackblitz.com/edit/nuxt-starter-i18n-timothe-kab8ad?file=nuxt.config.ts,pages/index.vue,package.json
Would be nice to work with defineI18nRoute macro too

Input

export default defineNuxtConfig({
...
  i18n: {
    strategy: 'prefix_except_default',
    customRoutes: 'config',
    pages: {
      index: {
        fr: '/',
        en: '/home',
      },
      other: {
        fr: '/autre-page',
        en: '/other-page',
      },
    },
  },
  robots: {
    allow: ['/'],
    disallow: ['/other'],
  },

Actual output

User-agent: *
Allow: /
Allow: /en/
Disallow: /other
Disallow: /en/other

Expected output

User-agent: *
Allow: /
Allow: /en/home
Disallow: /autre-page
Disallow: /en/other-page

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