Skip to content
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

[i18n] Sitemap is not generated on build #200

Closed
Ryusse opened this issue Feb 10, 2025 · 2 comments
Closed

[i18n] Sitemap is not generated on build #200

Ryusse opened this issue Feb 10, 2025 · 2 comments

Comments

@Ryusse
Copy link

Ryusse commented Feb 10, 2025

Hello, I hope you have a nice day.
I just installed @inox-tools/sitemap-ext, I followed the instructions in the documentation but in my project when doing the build it does not generate the sitemap.

Image

I am using i18n astro like this

Image

I also tried using

//pages/[lang]/about.astro
import sitemap from "sitemap-ext:config";

sitemap(true);

But it doesn't work either

Here is a link for you to reproduce the error I am having https://github.com/Ryusse/silvana-website

Thanks.

@Fryuni
Copy link
Owner

Fryuni commented Feb 12, 2025

sitemap(true) works only for:

  • prerendered pages
  • SSR pages with static paths

Your screenshot shows that you don't have anything prerendered and the route is dynamic [lang], so the sitemap integration is correct in stating that no pages were found.

@Fryuni
Copy link
Owner

Fryuni commented Feb 12, 2025

For that use case you can use a config callback and call the setSitemap:
https://inox-tools.fryuni.dev/sitemap-ext#setsitemap

@Fryuni Fryuni closed this as completed Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants