sitemap module wont show dynamic routes, routes are empty
we tried to create on root ebene ( /server/api/sitemap/urls.ts ) the following
in the images you can see our nuxt config.
its like we wont even get in to the urls.ts file
18 Replies
this is how the sitemap for "pages" looks like for example
@Philip a running reproduction would be helpful
https://support.utm-shop.de/ this is our live webpage
do you want this?
Support für Sophos XGS, Central, AP, RED | UTMshop
Professionelle Unterstützung für Ihre Sophos-Produkte: Technischer Support✓ Fehlerbehebung✓ Einrichtungen✓ RMA✓
no, a full project website (or even a full project source code) is not helpful here
In my spare time, I can't go through full projects (that's actually my day job 🙈 )
A minimal reproduction: https://stackoverflow.com/help/minimal-reproducible-example
Stack Overflow
How to create a Minimal, Reproducible Example - Help Center
Stack Overflow | The World’s Largest Online Community for Developers
i totally get this, but what can i provide what makes it easier for you to reproduce?
you want a small version which you can just pull and reprodurce?
exactly
ahh i see
ideally a stackblitz
so it can run online
i will try to do that
thanks
^that's a good starting point
its just i dont really wanna publish our cdn or credentials and to reproduce everything will take ma ton of time 😦 Isnt there a better way? i get you, that you dont wanna reproduce all by yourself. But to create a new directus project cdn etc. just to reproduce this issue is a bit to much dont you think so?
our project is quite big and there are some dependencies which are building on each other and i think to reproduce this case is almost like building the project again (4-5 month)
a small version of it wouldnt reproduce the issue
What other option do you have in mind?
I think a small reproduction just with the sitemap module and some fake data should work, no?
and if this works as expected, it is no bug in the module
So i found the solution... the docu is not accurate... instead of this /server/api/sitemap/urls.ts
i use this /server/api/sitemap.ts
And use the Module in the nuxt.config like in the picture...
the docs are not good
here our rewritten code for the sitemap.ts
✅
@Philip would you consider sending a PR to improve the doc then?
Wäre super 😋
ich gucke mal wie ich Zeit finde 😅 vllt habe ich doch etwas falsch gemacht und durch Zufall einen workaround gefunden. In einem anderem Projekt werde ich nochmal genau das machen was die docs sagen und sollte sich das nochmal bestätigen, dass es nicht funktioniert mit der Ordnerstruktur, dann mache ich einen PR versprochen.