kenshodigital / kirby-htmldoc
Minifies HTML5 output for Kirby projects.
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Type:kirby-plugin
Requires
- php: ^8.3
- getkirby/cms: ^4.1
- getkirby/composer-installer: ^1.2
- hexydec/htmldoc: ^1.8
README
Minifies HTML5 output for Kirby projects.
General
Integrates Hexydec’s excellent HTMLDoc library into Kirby projects to minify HTML5 output.
Installation
composer require kenshodigital/kirby-htmldoc ^2.0
Usage
Basically works out of the box without any additional configuration.
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, ], ... ], ], ], ];
Defaults
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.