Compactor plugin
OctoberCMS plugin that provides HTML code minification., (*1)
Configuration
Default configuration for the plugin is:, (*2)
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., (*3)
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
:, (*4)
interface HtmlCompactorInterface
{
/**
* @param string $html
* @return string
*/
public function compactHtml($html);
}