Skip to content

fix: asSitemapCollection maybe Incompatible with prefix properties #491

@cscsyiku123

Description

@cscsyiku123

🐛 The bug

import { defineCollection, defineContentConfig } from '@nuxt/content';
import { asSitemapCollection } from '@nuxtjs/sitemap/content';
export default defineContentConfig(() => {
  return {
    collections: {
      content_en: defineCollection(
        asSitemapCollection({
          type: 'page',
          source: {
            include: 'en/**',
            prefix: '',   //note
          },
        }),
     content_zh: defineCollection(
        asSitemapCollection({
          type: 'page',
          source: {
            include: 'zh/**',
            prefix: '',   //note
          },
        }),
      ),})

In this example, when prefix is ​​set to '', zh sitemap is missing content, and when prefix is ​​not set or 'zh' sitemap is normal,this is known issue or not ?

🛠️ To reproduce

If it is not a known issue

🌈 Expected behavior

When the prefix is ", the site map still has the correct content

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions