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

How to create .xml.gz sitemap index ? #16

Closed
rizkiheryandi opened this issue Feb 18, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@rizkiheryandi
Copy link

commented Feb 18, 2018

I have web app with lots of URL of single product (let's say it's a e-commerce website).

Let's say i have 60.000 url to save in my sitemap, and i separate that with 2 sitemap.

And each sitemap i wanna compress it with .xml.gz format, to reduce its size.

I can easily do that with PHP (i used laravel), but how to do that with NuxtJs ? (even a pure javascript besides the NuxtJs)

Can someone help me ?

Thank you :)

This question is available on Nuxt.js community (#c14)
@delucis

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2018

I don’t think this is currently possible with sitemap-module alone. It calls the .toXml() method from sitemap.js, which it is built on top of.

sitemap.js does implement a .toGzip() method although it seems to only use it for sitemap indexes not single sitemap files.

Your best options might be either be to fork sitemap-module replacing .toXml() calls with .toGzip(), or to write a separate Nuxt module, which processes sitemap-module’s output using Node’s built in Gzip tools. Haven’t tried either, so don’t know how well either of those would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.