{"id":44666340,"url":"https://github.com/abordage/html-min","last_synced_at":"2026-02-15T00:34:58.051Z","repository":{"id":54336084,"uuid":"502607590","full_name":"abordage/html-min","owner":"abordage","description":"HtmlMin is very simple (and very fast) PHP package for minification HTML","archived":false,"fork":false,"pushed_at":"2024-12-23T08:03:43.000Z","size":70,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-23T14:02:57.846Z","etag":null,"topics":["html-compress","html-minification","html-minifier","html-minify"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abordage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-12T12:18:40.000Z","updated_at":"2024-12-04T19:35:31.000Z","dependencies_parsed_at":"2024-04-29T09:41:44.764Z","dependency_job_id":null,"html_url":"https://github.com/abordage/html-min","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.29032258064516125","last_synced_commit":"d1a4b1608739b447655a142d83e4a4cf9537707f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/abordage/html-min","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abordage%2Fhtml-min","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abordage%2Fhtml-min/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abordage%2Fhtml-min/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abordage%2Fhtml-min/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abordage","download_url":"https://codeload.github.com/abordage/html-min/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abordage%2Fhtml-min/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29461911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T22:42:09.113Z","status":"ssl_error","status_checked_at":"2026-02-14T22:42:05.053Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html-compress","html-minification","html-minifier","html-minify"],"created_at":"2026-02-15T00:34:57.498Z","updated_at":"2026-02-15T00:34:58.045Z","avatar_url":"https://github.com/abordage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\n# HtmlMin: PHP package for HTML minification\n\nVery simple (and very fast) html compression. See [benchmark and comparison](https://github.com/abordage/html-min-benchmark)\n\n\u003cp style=\"text-align: center;\" align=\"center\"\u003e\n    \u003cimg alt=\"HtmlMin\" src=\"https://github.com/abordage/html-min/blob/master/docs/images/abordage-html-min-cover.png?raw=true\"\u003e\n\u003c/p\u003e\n\n\u003cp style=\"text-align: center;\" align=\"center\"\u003e\n\n\n\u003ca href=\"https://packagist.org/packages/abordage/html-min\" title=\"Packagist version\"\u003e\n    \u003cimg alt=\"Packagist Version\" src=\"https://img.shields.io/packagist/v/abordage/html-min\"\u003e\n\u003c/a\u003e\n\n\n\u003ca href=\"https://github.com/abordage/html-min/actions/workflows/tests.yml\" title=\"GitHub Tests Status\"\u003e\n    \u003cimg alt=\"GitHub Tests Status\" src=\"https://img.shields.io/github/actions/workflow/status/abordage/html-min/tests.yml?label=tests\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/abordage/html-min/actions/workflows/tests.yml\" title=\"GitHub Code Style Status\"\u003e\n    \u003cimg alt=\"GitHub Code Style Status\" src=\"https://img.shields.io/github/actions/workflow/status/abordage/html-min/php-cs-fixer.yml?label=code%20style\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.php.net/\" title=\"PHP version\"\u003e\n    \u003cimg alt=\"PHP Version Support\" src=\"https://img.shields.io/packagist/php-v/abordage/html-min\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/abordage/html-min/blob/master/README.md\" title=\"License\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/abordage/html-min\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\n## Features\n- Removing extra whitespaces\n- Removing html comments\n- Removing trailing slashes from void elements (HTML5)\n- Skip `textarea`, `pre` and `script` elements\n- Compresses in microseconds. See benchmark and comparison\n\n## Requirements\n- PHP 7.4 or higher\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require abordage/html-min\n```\n\n## Quick start\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/vendor/autoload.php';\n\n$htmlMin = new Abordage\\HtmlMin\\HtmlMin();\n$result = $htmlMin-\u003eminify(\"\u003c!DOCTYPE html\u003e\u003chtml\u003e   ...  \u003c/html\u003e\");\n```\n## Options\n\n```php\n$htmlMin-\u003efindDoctypeInDocument();           // default: true\n$htmlMin-\u003eremoveWhitespaceBetweenTags();     // default: true\n$htmlMin-\u003eremoveBlankLinesInScriptElements(); // default: false\n$htmlMin-\u003eremoveTrailingSlashes();           // default: false\n```\n\n### Remove trailing slashes\n\nIn HTML5, void elements (`\u003clink\u003e`, `\u003cmeta\u003e`, `\u003cimg\u003e`, `\u003cbr\u003e`, etc.) should not have trailing slashes.\nEnable this option to convert XHTML-style tags like `\u003clink ... /\u003e` to HTML5-style `\u003clink ...\u003e`.\n\n```php\n$htmlMin-\u003eremoveTrailingSlashes();\n$result = $htmlMin-\u003eminify('\u003clink rel=\"stylesheet\" href=\"style.css\" /\u003e');\n// Result: \u003clink rel=\"stylesheet\" href=\"style.css\"\u003e\n```\n\n## Benchmark\n\nSee [abordage/html-min-benchmark](https://github.com/abordage/html-min-benchmark)\n\n## Testing\n\n```bash\ncomposer test:all\n```\n\nor\n\n```bash\ncomposer test:phpunit\ncomposer test:phpstan\ncomposer test:phpcsf\n```\n\nor see https://github.com/abordage/html-min/actions/workflows/tests.yml\n\n## Feedback\n\nIf you have any feedback, comments or suggestions, please feel free to open an issue within this repository.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/abordage/.github/blob/master/CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Pavel Bychko](https://github.com/abordage)\n- [All Contributors](https://github.com/abordage/html-min/graphs/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabordage%2Fhtml-min","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabordage%2Fhtml-min","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabordage%2Fhtml-min/lists"}