{"id":15163067,"url":"https://github.com/halo-lab/eleventy-plugin-compress","last_synced_at":"2025-09-30T17:30:24.866Z","repository":{"id":57222331,"uuid":"355087112","full_name":"Halo-Lab/eleventy-plugin-compress","owner":"Halo-Lab","description":"Compresses HTML and assets (CSS, JavaScript) that are referenced from it with brotli, gzip and deflate algorithms.","archived":true,"fork":false,"pushed_at":"2022-01-18T07:36:03.000Z","size":56,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-24T00:50:00.510Z","etag":null,"topics":["brotli","compression","deflate","eleventy","gzip"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Halo-Lab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-06T06:48:50.000Z","updated_at":"2023-04-15T16:53:56.000Z","dependencies_parsed_at":"2022-09-07T16:20:41.269Z","dependency_job_id":null,"html_url":"https://github.com/Halo-Lab/eleventy-plugin-compress","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Feleventy-plugin-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Feleventy-plugin-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Feleventy-plugin-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Halo-Lab%2Feleventy-plugin-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Halo-Lab","download_url":"https://codeload.github.com/Halo-Lab/eleventy-plugin-compress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234753661,"owners_count":18881435,"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":["brotli","compression","deflate","eleventy","gzip"],"created_at":"2024-09-27T02:02:59.556Z","updated_at":"2025-09-30T17:30:24.124Z","avatar_url":"https://github.com/Halo-Lab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eleventy-plugin-compress 👜\n\n**⚠️ This code moves to [the new location](https://github.com/Halo-Lab/eleventy-packages). Please, refer there to get a new development status.**\n\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\nCompresses HTML and assets (CSS, JavaScript) that are referenced from it with [`brotli`](https://brotli.org), [`gzip`](http://www.gzip.org) and [`deflate`](https://en.wikipedia.org/wiki/Deflate) algorithms.\n\n## Intention\n\nEven big assets(pages, scripts, styles) should be delivered to client quickly. In order to do that, they must be compressed ☝️! ... At least.\n\n## Get started\n\n### Installation\n\nAt first run:\n\n```sh\nnpm i -D eleventy-plugin-compress\n```\n\nand eventually add to Eleventy as plugin:\n\n```js\nconst { compress } = require('eleventy-plugin-compress');\n\nmodule.exports = (eleventyConfig) =\u003e {\n  eleventyConfig.addPlugin(compress, {\n    /* Optional options. */\n  });\n};\n```\n\n\u003e Important: you should register plugin after any other plugins or [`transform`](https://www.11ty.dev/docs/config/#transforms) functions!\n\n### Options\n\nThe plugin can accept following options:\n\n```ts\ntype CompressAlgorithm = 'brotli' | 'gzip' | 'deflate';\n\ninterface CompressPluginOptions {\n  /**\n   * Signals whether this plugin should do its job.\n   * By default, it is on in production environment.\n   */\n  enabled?: boolean;\n  algorithm?: CompressAlgorithm | ReadonlyArray\u003cCompressAlgorithm\u003e;\n}\n```\n\nYou can choose one of some algorithms to compress assets. By default, `brotli` is used.\n\n\u003e For proper work of this plugin, it is assumed that in time of compiling HTML all CSS and JavaScript are already processed and folded into [_output_](https://www.11ty.dev/docs/config/#output-directory) directory.\n\n## Word from author\n\nHave fun! ✌️\n\n\u003ca href=\"https://www.halo-lab.com/?utm_source=github\"\u003e\n  \u003cimg src=\"https://dgestran.sirv.com/Images/supported-by-halolab.png\" alt=\"Supported by Halo lab\" height=\"60\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-lab%2Feleventy-plugin-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalo-lab%2Feleventy-plugin-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalo-lab%2Feleventy-plugin-compress/lists"}