Skip to content

Commit 4b3bf1e

Browse files
committed
adding verbose option
1 parent 9be49b4 commit 4b3bf1e

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
@@ -266,6 +266,7 @@ protected function makeContentGenerationClosures($pages, $request)
266266
$count = 0;
267267
$warnings = [];
268268
$errors = [];
269+
$verbose = config('statamic.ssg.verbose');
269270

270271
foreach ($pages as $page) {
271272
$oldCarbonFormat = $this->getToStringFormat();
@@ -282,7 +283,9 @@ protected function makeContentGenerationClosures($pages, $request)
282283

283284
$request->setPage($page);
284285

285-
Partyline::line("\x1B[1A\x1B[2KGenerating ".$page->url());
286+
if ($verbose) {
287+
Partyline::line("\x1B[1A\x1B[2KGenerating " . $page->url());
288+
};
286289

287290
try {
288291
$generated = $page->generate($request);

0 commit comments

Comments
 (0)