Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dynamic chunking #361

Closed
ronenteva opened this issue Sep 17, 2024 · 2 comments
Closed

feat: Dynamic chunking #361

ronenteva opened this issue Sep 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ronenteva
Copy link

🆒 Your use case

Following #360 and #265, as user needs can become complicated and specific, I suggest supporting an api endpoint for dynamic chunking.

🆕 The solution you'd like

export default defineNuxtConfig({
  sitemap: {
    sitemapsSource: '/api/sitemap-index`
  }
})
export default defineSitemapIndexEventHandler(async () => {
  return categories.map(category=>{
    return locales.map(locale=>{
      return pages.map(page=>{
        return {
          sitemap: `sitemap-${locale}-${category}-${page}`,
          source: `...`
        }
      })
    })
  })

🔍 Alternatives you've considered

No response

ℹ️ Additional info

No response

@ronenteva ronenteva added the enhancement New feature or request label Sep 17, 2024
@harlan-zw
Copy link
Collaborator

Thanks for the suggestion, I don't plan on adding any support for this outside of the Nitro hook which should let you customize the output however you like.

See https://nuxtseo.com/sitemap/nitro-api/nitro-hooks#sitemapindex-resolved

@harlan-zw harlan-zw closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
@ronenteva
Copy link
Author

Oh perfect, that's definitely good enough, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants