Current state with latest updates
This commit is contained in:
@@ -96,6 +96,35 @@ final class GenerateSitemapsCommand extends Command
|
||||
));
|
||||
}
|
||||
|
||||
foreach ($build->enabledGroupIndexes() as $groupName => $groupFamilies) {
|
||||
foreach ($groupFamilies as $family) {
|
||||
if (! in_array($family, $families, true)) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$t = microtime(true);
|
||||
$built = $build->buildNamed($groupName, force: true, persist: false);
|
||||
|
||||
if ($built === null) {
|
||||
$this->line(sprintf(' <comment>–</comment> %s.xml <fg=red>SKIPPED</> (group builder returned null)', $groupName));
|
||||
$failed++;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = 'sitemaps/' . $groupName . '.xml';
|
||||
$disk->put($path, $built['content']);
|
||||
$written++;
|
||||
|
||||
$this->line(sprintf(
|
||||
' <info>✔</info> %s %d entries <comment>%.3fs</comment>',
|
||||
$groupName . '.xml',
|
||||
$built['url_count'] ?? 0,
|
||||
microtime(true) - $t,
|
||||
));
|
||||
}
|
||||
|
||||
// ── Summary ───────────────────────────────────────────────────────
|
||||
$this->newLine();
|
||||
$this->info(sprintf(
|
||||
|
||||
Reference in New Issue
Block a user