Scalable server-sided sitemaps with possible sitemapSize prop usage #474
Unanswered
hunterfoulk
asked this question in
Q&A
Replies: 2 comments
-
I would require this feature as well, any contribution is appreciated. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am looking for something like this as well |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey we are looking for any guidance on how to use the sitemapSize prop or if theres any possible solution we can use to achieve this, assuming it is only used and available during the build time, in our application we are using getServerSideProps to fetch our dynamic data/posts that will eventually have a potential of millions of posts at run time for SEO purposes and looking for any scalable techniques.
Heres what we got going so far
server-sitemap.xml
We are looking to fetch 50k posts per sitemap in the first posts-sitemap.xml folder, with some how knowing that first sitemap has 50k posts and we need to generate another sitemap say posts-sitemap-2.xml the problem is this folder isnt technically a sitemap file, its just a javascript file thats fetching posts on the server and just rendering XML in the component, but for SEO purposes these posts need to be fetched at run time/ on the server.
Would greatly appreciate any suggestions we can try to stray away from having to manually create posts-sitemap-2.xml, posts-sitemap-3.xml, posts-sitemap-4.xml which just holds their own index.js that would fetch the correct posts(posts-sitemap-1.xml holding 0-50k, posts-sitemap-2.xml holding 50k-100k etc...)
Looks like the only thing getServerSideSitemap does is return XML from the server using res.write from the context prop you have access with next which we can do manually in the commented code block.
The main problem is essentially you would need to serve a new folder which each holds a index.js with its correct posts data which is a very confusing thought.
Any pointers are greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions