Skip to content

Minifies HTML5 output for Kirby projects.

License

Notifications You must be signed in to change notification settings

kenshodigital/kirby-htmldoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.