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

help: generate dynamic sitemap and include external sitemap #359

Open
gsabater opened this issue Nov 23, 2024 · 0 comments
Open

help: generate dynamic sitemap and include external sitemap #359

gsabater opened this issue Nov 23, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@gsabater
Copy link

📚 What are you trying to do?

Hello,

i would like to create a new sitemap merging the current project routes and an external sitemap from an api.

🔍 What have you tried?

I’m using Nuxt Sitemap to generate a list of URLs with the crawler module, and it's working as expected with the following configuration:

sitemap: {
  enabled: true,
  exclude: ['/tabler*', '/account/**', '/dev/**'],
  cacheMaxAgeSeconds: 3600 * 24,
}

However, I want to include a large and expensive sitemap from an API, which contains over 40,000 game links. I’ve partially achieved this by adding the API URL as a source. Even though the URL is .xml, the data is dynamically loaded from the database:

sources: [
  'https://api.backlog.rip/sitemap.xml',
]

Finally, during the build process, I want to generate a static sitemap.xml file that merges the crawled URLs with the external API URLs so that the application no longer queries the API at runtime.

I’ve tried consulting GPT, reviewing the documentation, and checking GitHub issues, but I haven’t been able to find a definitive solution. I’ve experimented with several approaches, but I’m unsure if this is achievable with the current setup.

Thanks for your time and any guidance you can provide!

ℹ️ Additional context

No response

@gsabater gsabater added the help wanted Extra attention is needed label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant