{"id":22999049,"url":"https://github.com/ocubom/html-bundle","last_synced_at":"2025-06-29T15:06:33.120Z","repository":{"id":139590227,"uuid":"528532977","full_name":"ocubom/html-bundle","owner":"ocubom","description":"A Symfony bundle to integrate several custom utilities for HTML manipulation","archived":false,"fork":false,"pushed_at":"2022-12-17T10:29:57.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T13:48:57.152Z","etag":null,"topics":["bundle","compress","html","html-attributes","http-headers","minify","php","symfony","symfony-bundle"],"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/ocubom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-08-24T17:47:17.000Z","updated_at":"2023-11-08T16:58:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"7567fce2-cb83-423e-b7cb-9513d71ae17c","html_url":"https://github.com/ocubom/html-bundle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ocubom/html-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocubom%2Fhtml-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocubom%2Fhtml-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocubom%2Fhtml-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocubom%2Fhtml-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocubom","download_url":"https://codeload.github.com/ocubom/html-bundle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocubom%2Fhtml-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262614457,"owners_count":23337277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bundle","compress","html","html-attributes","http-headers","minify","php","symfony","symfony-bundle"],"created_at":"2024-12-15T06:15:25.174Z","updated_at":"2025-06-29T15:06:33.074Z","avatar_url":"https://github.com/ocubom.png","language":"PHP","readme":"\u003cdiv align=\"center\"\u003e\n\nOcubom HTML Bundle\n==================\n\nA Symfony bundle to integrate several custom utilities for HTML manipulation\n\n[![Contributors][contributors-img]][contributors-url]\n[![Forks][forks-img]][forks-url]\n[![Stargazers][stars-img]][stars-url]\n[![Issues][issues-img]][issues-url]\n[![License][license-img]][license-url]\n\n[![Version][packagist-img]][packagist-url]\n[![CI][workflow-ci-img]][workflow-ci-url]\n[![Code Quality][quality-img]][quality-url]\n[![Coverage][coverage-img]][coverage-url]\n\n[**Explore the docs »**](https://github.com/ocubom/html-bundle)\n\n[Report Bug](https://github.com/ocubom/html-bundle/issues)\n·\n[Request Feature](https://github.com/ocubom/html-bundle/issues)\n\n\u003c/div\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eContents\u003c/summary\u003e\n\n* [About HTML Bundle](#about-html-bundle)\n* [Getting Started](#getting-started)\n    * [Installation](#installation)\n    * [Usage](#usage)\n* [Roadmap](#roadmap)\n* [Contributing](#contributing)\n* [Authorship](#authorship)\n* [License](#license)\n\n\u003c/details\u003e\n\n## About HTML Bundle\n\n[Ocubom HTML Bundle](https://github.com/ocubom/html-bundle) is a [Symfony Bundle][] that integrates several utilities for HTML manipulation.\n\nThis suite started as an internal class based on [nochso/html-compress-twig][] to allow the use of [wyrihaximus/html-compress][] with Twig 3.0.\nThis class used to be embedded into several projects.\nOver time, each project adapted its version slightly, leading to fragmented development and difficult maintenance.\nTherefore, the development is unified in this extension which is made public in case it is useful for other projects.\n\n## Getting Started\n\n### Installation\n\nMake sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.\n\n#### Applications that use Symfony Flex\n\nOpen a command console, enter your project directory and execute:\n\n```console\n$ composer require ocubom/html-bundle\n```\n\n#### Applications that don't use Symfony Flex\n\n##### Step 1: Download the Bundle\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n```console\n$ composer require ocubom/html-bundle\n```\n\n##### Step 2: Enable the Bundle\n\nThen, enable the bundle by adding it to the list of registered bundles\nin the `config/bundles.php` file of your project:\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    Ocubom\\HtmlBundle\\OcubomHtmlBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\n### Usage\n\nJust create the file `config/packages/ocubom_html.yaml` using the configuration reference:\n\n```console\nbin/console config:dump-reference ocubom_html\n```\n\nYou can use the [example configuration][] provided.\n\n```yaml\nocubom_html:\n\n    # Register Ocubom/TwigHtmlExtension to minify the HTML (defaults)\n    compress:\n        force: false\n        level: smallest\n        \n    # Headers extract\n    # The listener is only registered if some header is registered\n    #headers:\n    #    # Duplicate robots meta as X-Robots-Tag\n    #    # @see https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#xrobotstag\n    #    -   name:    'X-Robots-Tag'\n    #        pattern: '@[\\p{Zs}]*\u003cmeta\\s+(?:name=\"robots\"\\s+content=\"([^\"]+)\"|content=\"([^\"]+)\"\\s+name=\"robots\")\\s*/?\\s*\u003e\\p{Zs}*\\n?@i'\n    #        value:   '%2$s'\n    #        replace: '%1$s'\n    #        formats:\n    #            - 'text/html'\n    #\n    #    # Disable Metro Interface\n    #    # @see https://github.com/h5bp/html5-boilerplate/blob/5.3.0/dist/doc/extend.md#prompt-users-to-switch-to-desktop-mode-in-ie10-metro\n    #    -   name:    'X-UA-Compatible'\n    #        enabled: true\n    #        pattern: '@[\\p{Zs}]*\u003cmeta\\s+(?:http-equiv=\"X-UA-Compatible\"\\s+content=\"([^\"]+)\"|content=\"([^\"]+)\"\\s+http-equiv=\"X-UA-Compatible\")\\s*\u003e\\p{Zs}*\\n?@i'\n    #        value:   '%2$s'\n    #        replace: '' # Delete the meta tag as is not standard\n    #        formats:\n    #            - 'text/html'\n```\n\n\u003e **Note**\n\u003e This configuration will be installed if your project uses [endroid/installer][]\n\n_For more examples, please refer to the [Documentation](https://github.com/ocubom/html-bundle)._\n\n## Roadmap\n\nSee the [open issues](https://github.com/ocubom/html-bundle/issues) for a full list of proposed features (and known issues).\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create.\nAny contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request.\nYou can also simply open an issue with the tag \"enhancement\".\n\n1. Fork the Project.\n2. Create your Feature Branch (`git checkout -b feature/your-feature`).\n3. Commit your Changes (`git commit -m 'Add your-feature'`).\n4. Push to the Branch (`git push origin feature/your-feature`).\n5. Open a Pull Request.\n\n## Authorship\n\n* Oscar Cubo Medina — [@ocubom](https://twitter.com/ocubom) — https://ocubom.page \u003cdiv align=\"center\"\u003e\n\nSee also the list of [contributors][contributors-url] who participated in this project.\n\n## License\n\nDistributed under the MIT License.\nSee [LICENSE][] for more information.\n\n\n[LICENSE]: https://github.com/ocubom/html-bundle/blob/master/LICENSE\n[example configuration]: https://github.com/ocubom/html-bundle/blob/main/.install/symfony/config/packages/ocubom_html.yaml\n\n\u003c!-- Links --\u003e\n[composer]: https://getcomposer.org/\n[endroid/installer]: https://packagist.org/packages/endroid/installer\n[Symfony]: https://symfony.com/\n[Symfony Bundle]: https://symfony.com/doc/current/bundles.html\n\n\u003c!-- Packagist links --\u003e\n[nochso/html-compress-twig]: https://packagist.org/packages/nochso/html-compress-twig\n[wyrihaximus/html-compress]: https://packagist.org/packages/wyrihaximus/html-compress\n\n\u003c!-- Project Badges --\u003e\n[contributors-img]: https://img.shields.io/github/contributors/ocubom/html-bundle.svg?style=for-the-badge\n[contributors-url]: https://github.com/ocubom/html-bundle/graphs/contributors\n[forks-img]:        https://img.shields.io/github/forks/ocubom/html-bundle.svg?style=for-the-badge\n[forks-url]:        https://github.com/ocubom/html-bundle/network/members\n[stars-img]:        https://img.shields.io/github/stars/ocubom/html-bundle.svg?style=for-the-badge\n[stars-url]:        https://github.com/ocubom/html-bundle/stargazers\n[issues-img]:       https://img.shields.io/github/issues/ocubom/html-bundle.svg?style=for-the-badge\n[issues-url]:       https://github.com/ocubom/html-bundle/issues\n[license-img]:      https://img.shields.io/github/license/ocubom/html-bundle.svg?style=for-the-badge\n[license-url]:      https://github.com/ocubom/html-bundle/blob/master/LICENSE\n[workflow-ci-img]:  https://img.shields.io/github/actions/workflow/status/ocubom/html-bundle/test.yml?branch=main\u0026label=CI\u0026logo=github\u0026style=for-the-badge\n[workflow-ci-url]:  https://github.com/ocubom/html-bundle/actions/\n[packagist-img]:    https://img.shields.io/packagist/v/ocubom/html-bundle.svg?logo=packagist\u0026logoColor=%23fefefe\u0026style=for-the-badge\n[packagist-url]:    https://packagist.org/packages/ocubom/html-bundle\n[coverage-img]:     https://img.shields.io/scrutinizer/coverage/g/ocubom/html-bundle.svg?logo=scrutinizer\u0026logoColor=fff\u0026style=for-the-badge\n[coverage-url]:     https://scrutinizer-ci.com/g/ocubom/html-bundle/code-structure/main/code-coverage\n[quality-img]:      https://img.shields.io/scrutinizer/quality/g/ocubom/html-bundle.svg?logo=scrutinizer\u0026logoColor=fff\u0026style=for-the-badge\n[quality-url]:      https://scrutinizer-ci.com/g/ocubom/html-bundle/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focubom%2Fhtml-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focubom%2Fhtml-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focubom%2Fhtml-bundle/lists"}