configurable gzip compression, defaults to false
This commit is contained in:
parent
66df795d25
commit
cd780914d4
1 changed files with 3 additions and 2 deletions
3
mkht.php
3
mkht.php
|
@ -39,6 +39,7 @@ $config['center-index'] ??= false;
|
|||
$config['default-lang'] ??= NULL;
|
||||
$config['announce-css'] ??= false;
|
||||
$config['announce-feed'] ??= false;
|
||||
$config['gzip'] ??= false;
|
||||
|
||||
if (!isset($config['id'])) {
|
||||
$config['id'] = bin2hex(random_bytes(32));
|
||||
|
@ -261,7 +262,7 @@ foreach ($pages as $node) {
|
|||
|
||||
file_put_contents($base_filepath_target . '.html', $content);
|
||||
|
||||
// Gzip compression
|
||||
if ($config['gzip'])
|
||||
exec('gzip --keep --fast --force ' . $base_filepath_target . '.html');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue