No description
- PHP 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| composer.json | ||
| index.php | ||
| LICENSE | ||
| README.md | ||
Kirby Minify HTML
A modified version of afbora/kirby-minify-html, a Kirby CMS plugin that minifies HTML output using voku/HtmlMin.
This fork retains the original plugin's functionality while adding a few improvements and fixes for URL optimization and HTML output.
Features
All original features from afbora/kirby-minify-html are preserved, along with the following modifications.
URL optimization
- *Preserve SEO URLs: Canonical and alternate links ( and ) keep their absolute URLs when doMakeSameDomainsLinksRelative() is enabled.
- Fix srcset optimization: Ensures that all URLs in srcset attributes are converted to relative URLs, not just the first one.
Installation
Install the plugin using Composer:
composer require sylvainallignol/kirby-minify-html
Configuration
The plugin retains the original configuration options.
Example:
return [
'sylvainallignol.minify-html' => [
'enabled' => true,
'ignore' => [
'sitemap',
'rss'
],
'options' => [
'doOptimizeViaHtmlDomParser' => true,
'doRemoveSpacesBetweenTags' => false,
'doMakeSameDomainsLinksRelative' => ['example.com']
]
]
];
Refer to the voku/HtmlMin documentation for the complete list of available optimization options.
Original project
This project is based on:
The original plugin's functionality and configuration structure have been retained.