Hi,
I was missing a HTML minifier feature, so I used the tiny-html-minifier from https://github.com/jenstornell/tiny-html-minifier
Installation:
This addon makes available a new tag called minify. It is very simple to use:
Code will minified to:
You can set two additional parameter (collapse_whitespace and disable_comments) to true or false (default is false):
Requirements
PHP7+
Hope, you like and need it
I was missing a HTML minifier feature, so I used the tiny-html-minifier from https://github.com/jenstornell/tiny-html-minifier
Installation:
- Download Add-On
- Extract directory `tiny-html-minifier` in 'couch/addons' folder.
- Add the following entry in 'couch/addons/kfunctions.php' file (if this file is not found, rename the kfunctions.example.php file to kfunctions.php)
- Code: Select all
require_once( K_COUCH_DIR.'addons/tiny-html-minifier/TinyMinify.php' );
This addon makes available a new tag called minify. It is very simple to use:
- Code: Select all
<cms:minify>
<!-- here comes your HTML and CMS code :) -->
<p>Compression works:</p>
<ul>
<li>
Really?
</li>
<li>
Really!
</li>
</ul>
</cms:minify>
Code will minified to:
- Code: Select all
<p>Compression works:</p> <ul> <li> Really? </li> <li> Really! </li> </ul>
You can set two additional parameter (collapse_whitespace and disable_comments) to true or false (default is false):
- Code: Select all
<cms:minify collapse_whitespace="true" disable_comments="true"></cms:minify>
Requirements
PHP7+
Hope, you like and need it
