Download the PHP package netnak/minimatic without Composer
On this page you can find all versions of the php package netnak/minimatic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package minimatic
Minimatic
Minimatic is a Statamic addon that minifies HTML responses and/or static cached pages using
voku/html-min.
🚀 Features
Minimatic wraps the powerful HtmlMin engine and exposes its configuration through a publishable config file. You can toggle the following features:
doOptimizeViaHtmlDomParser()– optimize HTML using the DOM parserdoRemoveComments()– remove HTML commentsdoSumUpWhitespace()– collapse excess whitespacedoRemoveWhitespaceAroundTags()– trim whitespace around tagsdoOptimizeAttributes()– optimize HTML attributesdoRemoveHttpPrefixFromAttributes()– striphttp:from attributesdoRemoveHttpsPrefixFromAttributes()– striphttps:from attributesdoKeepHttpAndHttpsPrefixOnExternalAttributes()– preserve prefixes for external linksdoMakeSameDomainsLinksRelative(['example.com'])– make internal links relativedoRemoveDefaultAttributes()– remove default attribute valuesdoRemoveDeprecatedAnchorName()– remove deprecated anchor name attributesdoRemoveDeprecatedScriptCharsetAttribute()– remove charset from<script>tagsdoRemoveDeprecatedTypeFromScriptTag()– remove deprecated type from<script>doRemoveDeprecatedTypeFromStylesheetLink()– removetype="text/css"from CSS linksdoRemoveDeprecatedTypeFromStyleAndLinkTag()– removetype="text/css"globallydoRemoveDefaultMediaTypeFromStyleAndLinkTag()– removemedia="all"doRemoveDefaultTypeFromButton()– removetype="submit"from buttonsdoRemoveEmptyAttributes()– strip empty attributesdoRemoveValueFromEmptyInput()– removevalue=""from empty inputsdoSortCssClassNames()– sort class names for better Gzip performancedoSortHtmlAttributes()– sort attributes for better Gzip performancedoRemoveSpacesBetweenTags()– aggressively trim inter-tag spacesdoRemoveOmittedQuotes()– omit unnecessary attribute quotesdoRemoveOmittedHtmlTags()– omit redundant HTML tags
📦 Installation
Install via Composer:
Then publish the config file (optional):
⚙️ Configuration
Minimatic auto-registers its own replacer at runtime.
However, if you want to manually ensure it's added as a static caching replacer, edit config/statamic/static_caching.php:
✅ Usage
Enable minification via your .env file:
These values toggle options in config/minimatic.php:
Exclude paths from minification with:
🪪 License
MIT — see the LICENSE file for details.