Minifies HTML5 output for Kirby projects.
Integrates Hexydec’s excellent HTMLDoc library into Kirby projects to minify HTML5 output.
composer require kenshodigital/kirby-htmldoc ^2.0
Basically works out of the box without any additional configuration.
However, applicable content types as well as the library’s default configuration can be easily modified in your site’s config.php
.
<?php declare(strict_types=1);
return [
'kensho.htmldoc' => [
'contentTypes' = [
'htm',
'html',
],
'config' => [
'minify' => [
'quotes' => false,
'urls' => [
'relative' => false,
'parent' => false,
],
...
],
],
],
];
Applicable content types are set to htm
and html
by default. For the library, only the settings for quotes and relative URLs deviate from the library’s defaults and are set to false
in this plugin.