Skip to content

Commit 6a07319

Browse files
authored
adding verbose option
1 parent 4ecf355 commit 6a07319

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

config/ssg.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,18 @@
115115

116116
'failures' => false, // 'errors' or 'warnings'
117117

118+
/*
119+
|--------------------------------------------------------------------------
120+
| Verbosity
121+
|--------------------------------------------------------------------------
122+
|
123+
| By default SSG will print out a lot of information about
124+
| what it is doing, including a line for every file it outputs.
125+
|
126+
| This option allows you to choose to get a little less information.
127+
|
128+
*/
129+
130+
'verbose' => true,
131+
118132
];

src/Generator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ protected function makeContentGenerationClosures($pages, $request)
264264
$count = 0;
265265
$warnings = [];
266266
$errors = [];
267+
$verbose = config('statamic.ssg.verbose');
267268

268269
foreach ($pages as $page) {
269270
// There is no getter method, so use reflection.
@@ -279,7 +280,9 @@ protected function makeContentGenerationClosures($pages, $request)
279280

280281
$request->setPage($page);
281282

282-
Partyline::line("\x1B[1A\x1B[2KGenerating ".$page->url());
283+
if ($verbose) {
284+
Partyline::line("\x1B[1A\x1B[2KGenerating " . $page->url());
285+
};
283286

284287
try {
285288
$generated = $page->generate($request);

0 commit comments

Comments
 (0)