-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
managing sitemap at runtime in swr with data from an headless cms #59
Comments
Hey @Sandros94, in the latest version of nuxt-simple-sitemp it reads from the request headers to determine the site URL. You should be able to just leave |
Thanks, as soon as I manage to list the slugs from my backend and test this I'll update. UPDATE: I'm in the process of studying different CMSs (testing payload rn) so I might take at least a week before I get back to this. 🙁 |
Hi, I added some slugs statically for now (to check if they are added to the sitemap, before fetching them from my CMS) to the code and my code looks like this:
I generated a build and I cant see the list of those in the sitemap.xml file. Only the prerendered routes are available. What must be going wrong? I am new to Nuxt in general. |
@arjunhadke7 Does it work in dev? If so, what method are you using to build / preview? |
No it doesnt show up at all on dev. |
@harlan-zw For now I am relying on Start-time dynamic URLs. Since I dont have a lot many posts or pages that are being called from the CMS. |
Will track this as part of #80 |
Sounds good. |
@Sandros94 I'm also struggling with Directus and this repository, did you find a solution? |
Not really, I got offtrack when the new SDK released. Currently I'm testing stuff around the |
Details
So, as stated in the nuxt-seo-kit I've noticed that simple-sitemap needs to prerender all the pages so that it could create the sitemap. Quite fine for SSG but not so much when on SSR with SWR and ISR...
So I started studying how dynamic urls setup works, but if I understand it correctly, for the
loc
I should provide the slug and not the full url right? But then where I put the full url? In thesitemap.siteUrl
insidenuxt.config.ts
? But if I do so doesn't it reactivate the prerendering?The text was updated successfully, but these errors were encountered: