Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.5 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.5 KB

HTMLDoc for Kirby

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.