configurable gzip compression, defaults to false
This commit is contained in:
parent
66df795d25
commit
cd780914d4
1 changed files with 3 additions and 2 deletions
5
mkht.php
5
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,8 +262,8 @@ foreach ($pages as $node) {
|
|||
|
||||
file_put_contents($base_filepath_target . '.html', $content);
|
||||
|
||||
// Gzip compression
|
||||
exec('gzip --keep --fast --force ' . $base_filepath_target . '.html');
|
||||
if ($config['gzip'])
|
||||
exec('gzip --keep --fast --force ' . $base_filepath_target . '.html');
|
||||
}
|
||||
|
||||
if ($page_names[$src] === 'index')
|
||||
|
|
Loading…
Reference in a new issue