Replies: 2 comments 1 reply
-
So, the way I'm doing this (for a model with > 200k records is):
In the model implement the
And then have a service or helper or controller or whatever to generate the sitemaps and a sitemap index:
Runs reasonably well, on my local dev environment, it creates the sitemap files for 200k records in under 4 minutes (would be much quicker but I have some scopes on the model that query other relationships to detemine validity - on a simpler model with around 30k records, it completes in a few seconds). |
Beta Was this translation helpful? Give feedback.
-
Hard to tell what's wrong from that partial code fragment - can you post it all and format it as a code block? Have you implemented |
Beta Was this translation helpful? Give feedback.
-
From what I read in the documentation I didn't see an example that fits my scenario.
I have 11 tables (models) and each one with about 320k posts and I need to generate sitemap for each one of them. But I need to limit to 46 thousand lines in the sitemap. But from what I read it is only possible to limit the number of lines (maxTagsPerSitemap) if I configure it to crawl my site. Am I right ?
or can I easily implement the sitemap in each table and set the tag limit?
I would like to do something like this:
SitemapGenerator::create(aa::all()) ->maxTagsPerSitemap(10000) ->writeToFile(public_path('sitemap.xml'));
How can I do this ?
Beta Was this translation helpful? Give feedback.
All reactions