mcustiel/compactor-plugin

There is no license information available for the latest version (dev-master) of this package.

Provides HTML minification

Installs: 580

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:october-plugin

dev-master 2016-10-25 12:23 UTC

This package is auto-updated.

Last update: 2022-06-19 05:10:14 UTC


README

OctoberCMS plugin that provides HTML code minification.

Configuration

Default configuration for the plugin is:

  • config.php:
return [
    'compactation' => [
        'enabled' => false,
        'compactor' => '\\Mcustiel\\Compactor\\Classes\\Services\\Implementation\\PhpWeeHtmlCompactor',
    ],
];

To activate page minification, you need to overwrite the config as explained in october's documentation and set 'enabled' to true.

If you want to add your own html minificator, you can specify it in the config. Your minificator must implement \Mcustiel\Compactor\Classes\Services\HtmlCompactorInterface:

interface HtmlCompactorInterface
{
    /**
     * @param string $html
     * @return string
     */
    public function compactHtml($html);
}