Open benedikt-bartscher opened 2 months ago
Hi, I'd to try this out.
@TG199 do you still want to try this?
Oh, yes I'll.
Hi @benedikt-bartscher ,
I have a few questions regarding the sitemap generation process, particularly about the differences between Reflex hosting and self-hosting.
generate_sitemap_config
function, but I'm still facing inconsistencies. Any guidance or insights would be greatly appreciated.Thank you!
Hi @TG199, thank you for looking into this.
As mentioned in the Issue description, reflex currently serves the sitemaps as part of the frontend. This means that the whole sitemap (including the deployment domain) is baked into the frontend.zip during export. This comes with multiple limitations:
/blog/[name]/
in the sitemapsTo improve this, we would first need to move sitemap generation and serving to the backend. Ideally, this should create the same sitemap for the same code (no breaking change). It could be as easy as iterating to all pages registered to the rx.App
. We could later introduce some cool apis for dynamic sitemap generation.
Currently, reflex generates sitemaps with a static domain. If you want to deploy the same codebase to 2 different domains, one would need to build 2 different docker images.
Possible Solutions:
next-sitemap
generation and replace it at runtimenext-sitemap
Both solutions would require us to move the sitemap serving from frontend to backend. Maybe there is a solution via nextjs which does not require this.
REF-3107