feat(html): minify static and dynamic html output
This commit is contained in:
parent
b6d5933433
commit
40fac0f6f2
18 changed files with 301 additions and 7 deletions
|
@ -40,3 +40,13 @@ schema: genre
|
|||
<button data-toggle-button>Show more</button>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<?php
|
||||
$html = ob_get_clean();
|
||||
$htmlMin = new HtmlMin();
|
||||
$htmlMin->doOptimizeAttributes(true);
|
||||
$htmlMin->doRemoveComments(true);
|
||||
$htmlMin->doSumUpWhitespace(true);
|
||||
$htmlMin->doRemoveWhitespaceAroundTags(true);
|
||||
$htmlMin->doOptimizeViaHtmlDomParser(true);
|
||||
echo $htmlMin->minify($html);
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue