nuxt-modules / sitemap

Powerfully flexible XML Sitemaps that integrate seamlessly, for Nuxt.
https://nuxtseo.com/sitemap
MIT License
336 stars 31 forks source link

help: [Vue Router warn]: No match found for location with path "/sitemap/blog.xml" #356

Closed reslear closed 2 months ago

reslear commented 2 months ago

📚 What are you trying to do?

Hello all, has anyone had this happen how to fix it?

It is unclear why there is __sitemap__ and somewhere else just sitemap/

CleanShot 2024-09-03 at 13 03 38@2x

CleanShot 2024-09-03 at 13 04 45@2x

// nuxt.config
{
  sitemaps: {
      // ...

      blog: {
        includeAppSources: true,
        include: ['/blog/**'],
      },

      events: {
        includeAppSources: true,
        include: ['/events/**'],
        defaults: { priority: 0.7 },
      },

      pages: {
        exclude: [
          '/how-to/**',
          '/blog/**',
          '/debug/**',
          '/landing/**',
          '/hubs/**',
          '/events/**',
          '/howto/**',
        ],
        includeAppSources: true,
      },
  },
  autoI18n: true,
  experimentalWarmUp: true,
}

part of debug:

{
    "include": [
        "/blog/**",
        "/ar/blog/**",
        "/be/blog/**",
        "/de/blog/**",
        "/es/blog/**",
        "/fr/blog/**",
        "/hi/blog/**",
        "/id/blog/**",
        "/it/blog/**",
        "/ja/blog/**",
        "/ko/blog/**",
        "/pl/blog/**",
        "/pt/blog/**",
        "/ru/blog/**",
        "/tr/blog/**",
        "/uk/blog/**",
        "/zh/blog/**"
    ],
    "exclude": [
        "/_nuxt/**",
        "/_**"
    ],
    "includeAppSources": true,
    "sitemapName": "blog",
    "_route": "sitemap/blog.xml",
    "_hasSourceChunk": false,
    "sources": []
}

I also don't like my _route, because https://github.com/nuxt-modules/sitemap/blob/681619454d0d0f9f974be786f5d4799cfa0a0523/test/unit/i18n.test.ts#L162 have a only translation.

also (ps hi @harlan-zw ) we already have to convert the objects to an array ?

https://github.com/nuxt-modules/sitemap/blob/28aa10110551f6600fc3ced765059af1ed3c6663/src/module.ts#L322-L327

🔍 What have you tried?

No response

ℹ️ Additional context

dependencies:
@nuxtjs/sitemap 6.0.0

devDependencies:
@nuxt/scripts 0.7.1
@nuxtjs/i18n 8.5.1
@nuxtjs/robots 4.1.6
nuxt 3.13.0
reslear commented 2 months ago

@harlan-zw really? Such a fast genius ❤️

please release it, I'll check it out

reslear commented 2 months ago

ok i patching package and problem fixed, awesome

harlan-zw commented 2 months ago

Oops pushed up 6.0.1 now :slightly_smiling_face:

Great to hear!