diff --git a/config/ssg.php b/config/ssg.php index ae331a4..d0652b1 100644 --- a/config/ssg.php +++ b/config/ssg.php @@ -115,4 +115,18 @@ 'failures' => false, // 'errors' or 'warnings' + /* + |-------------------------------------------------------------------------- + | Verbosity + |-------------------------------------------------------------------------- + | + | By default SSG will print out a lot of information about + | what it is doing, including a line for every file it outputs. + | + | This option allows you to choose to get a little less information. + | + */ + + 'verbose' => true, + ]; diff --git a/src/Generator.php b/src/Generator.php index 00026b9..46d81e1 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -264,6 +264,7 @@ protected function makeContentGenerationClosures($pages, $request) $count = 0; $warnings = []; $errors = []; + $verbose = config('statamic.ssg.verbose'); foreach ($pages as $page) { // There is no getter method, so use reflection. @@ -279,7 +280,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);