diff --git a/config/ssg.php b/config/ssg.php index ae331a4..2373bd5 100644 --- a/config/ssg.php +++ b/config/ssg.php @@ -115,4 +115,16 @@ 'failures' => false, // 'errors' or 'warnings' + /* + |-------------------------------------------------------------------------- + | Verbosity + |-------------------------------------------------------------------------- + | + | When enabled, the SSG will print a line for every page it generates. + | Useful for debugging or keeping track of the command's progress. + | + */ + + 'verbose' => true, + ]; diff --git a/src/Generator.php b/src/Generator.php index daadae5..d6dc7d5 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -266,6 +266,7 @@ protected function makeContentGenerationClosures($pages, $request) $count = 0; $warnings = []; $errors = []; + $verbose = config('statamic.ssg.verbose'); foreach ($pages as $page) { $oldCarbonFormat = $this->getToStringFormat(); @@ -280,7 +281,9 @@ protected function makeContentGenerationClosures($pages, $request) $request->setPage($page); - Partyline::line("\x1B[1A\x1B[2KGenerating ".$page->url()); + if ($verbose) { + Partyline::line("\x1B[1A\x1B[2KGenerating ".$page->url()); + } try { $generated = $page->generate($request);