Download the PHP package innoweb/silverstripe-minify-html without Composer
On this page you can find all versions of the php package innoweb/silverstripe-minify-html. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innoweb/silverstripe-minify-html
More information about innoweb/silverstripe-minify-html
Files in innoweb/silverstripe-minify-html
Package silverstripe-minify-html
Short Description Minifies the HTML output for all frontend requets using a middleware.
License BSD-3-Clause
Homepage https://github.com/xini/silverstripe-minify-html
Informations about the package silverstripe-minify-html
Silverstripe Minify HTML
Overview
Minifies the HTML output for all frontend requets using a middleware wrapping voku's HTML Compressor and Minifier for PHP.
Requirements
- Silverstripe CMS 6.x
- voku/html-min 4 || 5
Note: this version is compatible with SilverStripe 6. For SilverStripe 5, please see the 2 release line.
Installation
Install the module using composer:
Then run dev/build.
Enabling minification
Once installed, HTML minification is enabled by default.
See the example configuration in config/envtoggle.yml.example for how to toggle minification on/off for your environment via a .env variable.
In the example, a .env variable named HTML_MINIFICATION_ENABLED can be added, which will enable/disable minification based on whether the value is true or false/absent.
Configuration
The config variables are derived from voku's library and adjusted to work with Silverstripe. The following config values are available:
License
BSD 3-Clause License, see License