Limitation for sitemap.xml size

As someone who is looking to migrate to hugo, this is the biggest “missing” feature(I’m looking to migrate sites that have hundreds of thousands of pages).

The logic is fairly straightforward(I’ve never written a line of Go or I’d submit a pull request myself):


curpage_cnt = 0
sitemap_file_counter = 0
if(numpages >50k):
  for page in allpages:
    curpage_cnt += 1
    ...
    if(curpage_cnt % 50000 == 0):
      sitemap_file_counter += 1
      curpage_cnt = 0
    sitemap_file = "sitemap%s.xml.gz" % sitemap_file_counter
    ...

Then, sitemap.xml becomes a sitemap index that lists the all sitemap files generated above instead of pages.
https://support.google.com/webmasters/answer/75712

Is there any chance this is implemented in the foreseeable future? I would imagine others would value this as well…

I would be happy to give input or qa a proposed code branch if it would help, but would not trust myself to write acceptible Go code to implement.