Replies: 3 comments 2 replies
-
Sitemaps are related to the router, especially for static routes. But for anything dynamic, like a blog post slug or product ID, you’ll be better off generating a sitemap closer to your database rather than the router. |
Beta Was this translation helpful? Give feedback.
-
Gonna leave this here in case anyone needs it. I ran into this same issue of trying to generate a sitemap.xml file. Managed to figure out a way to do it from the routeTree.gen.ts file |
Beta Was this translation helpful? Give feedback.
-
Sample output?
Tanner Linsley
TanStack LLC
…On Jan 17, 2025 at 3:14 PM -0700, Roman Fedoruk ***@***.***>, wrote:
Gonna leave this here in case anyone needs it. I ran into this same issue of trying to generate a sitemap.xml file. Managed to figure out a way to do it from the routeTree.gen.ts file
https://www.npmjs.com/package/vite-plugin-tanstack-router-sitemap
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello,
We've recently integrated TanStack Router into our React application using Vite and are really enjoying its functionality. Our current challenge is figuring out how to generate a sitemap that reflects our router's structure. We came across a Vite plugin, vite-plugin-sitemap, which appears to offer sitemap generation capabilities based on specific input.
As I'm relatively new to using TanStack Router, I'm seeking advice on whether it's feasible to create a sitemap in this context, and if so, how to go about it using this plugin.
Any guidance or tips would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions