Auto creating sitemap and index files from one large list?

PTiCA1
0
PTiCA1
commented a year ago

What problem does this feature solve?

Hello to everybody,
does anyone have a solution to solve sitemap generation for a large number of pages? I generate articles from wordpress rest api and I need to split the sitemap into more files.

There is a solution in the sitemap.js documentation but I don't know how to use it in nuxt.js
https://github.com/ekalinin/sitemap.js#building-just-the-sitemap-index-file

Thanks for any advice.

idea
0
AndyCosow
10
AndyCosow
commented a year ago

Hi there, i was dealing with the similar problem - i made single sitemap with this module, there was little bit less than 50k links, so when provided that sitemap to google search console, they failed to fetch it.

My solution was to build sitemap index and put all the sub sitemaps in to it - i took all links from my old sitemap and divided them in categories. All this was done with sitemap.js in node.js using express router to send back response as generated sitemap.xml index file.

1
roryheaney
5
roryheaney
commented a year ago

@AndyCosow did you have example code for that available?

1
NicoPennec
2.1k
NicoPennec
commented a year ago

@PTiCA1 the "sitemap index" feature is WIP (see #6), but without limit size for now ๐Ÿ˜•

After a quick review, it seems that we can't use the createSitemapIndex function from sitemap.js you're quoting, because the sitemap-module dynamically returns the sitemaps and won't be able to write to a folder as the feature proposes.

When the new version of the sitemap module with sitemapindex will be published (and stable ^^). We can start developing your feature. It will be an useful enhance ๐Ÿ‘

1
AndyCosow
10
AndyCosow
commented a year ago

@roryheaney yes, here it is - On CodePile

I also recommend you to look in to sitemap.js documentation everything is pretty clear out there :)

1
ricardogobbosouza
1.2k
ricardogobbosouza
commented a year ago

@PTiCA1 This feature exists in v2.0.0
@NicoPennec can closed?

0
NicoPennec
2.1k
NicoPennec
commented a year ago

@ricardogobbosouza nope! the v2.0.0 add only a manual splitting. The auto splitting is planned for the next release (see milestone). I started working on it (but not published yet)

0
thinguyennam4059605
0
thinguyennam4059605
commented 9 months ago

Please release as soon as possible. Thanks

0
thinguyennam4059605
0
thinguyennam4059605
commented 9 months ago

How to auto generate Image Sitemaps?

https://support.google.com/webmasters/answer/178636

0
jd1378
0
jd1378
commented 9 months ago

Hi @NicoPennec , sorry about mentioning, Any news on this ? how is it going so far ? I know everyone's busy , just wanted to know if It's around the corner or we need to do it ourselves for now
Thanks

0
Informations
Feature Request โ€ข Open
#c62 - Created a year ago