Manual:$wgSitemapNamespaces

Details
Array of namespaces to generate a sitemap for when the maintenance/generateSitemap.php script is run, or false if one is to be generated for all namespaces.

Remember that you have to set this variable in AdminSettings.php in order to be available to the scripts called from the command line.