Support Promise for sitemaps option

hareku
18
hareku
commented 2 months ago

What problem does this feature solve?

I'm generating the sitemap like the below code.

export default {
  sitemaps: [
    // ...other routes

    {
      path: '/sitemap-users.xml',
      exclude: ['/**'],
      routes() {
        return axios.get('/api/sitemap-users').then(({ data }) => {
          return data.map(user => `/${user.display_name}`)
        })
      }
    },
  ]
}

But my app has about 100k users, so I want to divide sitemap-users.xml into the specified size. (e.g. sitemap-users-1.xml sitemap-users-2.xml)

idea
0
Informations
Feature RequestOpen
#c126 - Created 2 months ago