{"id":13806591,"url":"https://github.com/beyer-stefan/gofiber-minifier","last_synced_at":"2025-05-13T22:30:31.889Z","repository":{"id":222754278,"uuid":"753469278","full_name":"beyer-stefan/gofiber-minifier","owner":"beyer-stefan","description":"HTML, JavaScript, and CSS minifier for the gofiber-Framework","archived":false,"fork":false,"pushed_at":"2024-03-25T10:50:40.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-25T22:25:44.085Z","etag":null,"topics":["go","gofiber","golang","minifier","minify","minify-css","minify-html","minify-javascript","web"],"latest_commit_sha":null,"homepage":"","language":"Go","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/beyer-stefan.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}},"created_at":"2024-02-06T07:21:57.000Z","updated_at":"2024-04-15T06:59:09.311Z","dependencies_parsed_at":null,"dependency_job_id":"ac18433d-8b84-4ac9-bd13-bf3cb882ad4b","html_url":"https://github.com/beyer-stefan/gofiber-minifier","commit_stats":null,"previous_names":["beyer-stefan/gofiber-minifier"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyer-stefan%2Fgofiber-minifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyer-stefan%2Fgofiber-minifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyer-stefan%2Fgofiber-minifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyer-stefan%2Fgofiber-minifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyer-stefan","download_url":"https://codeload.github.com/beyer-stefan/gofiber-minifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225260744,"owners_count":17446097,"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":["go","gofiber","golang","minifier","minify","minify-css","minify-html","minify-javascript","web"],"created_at":"2024-08-04T01:01:13.625Z","updated_at":"2025-05-13T22:30:31.883Z","avatar_url":"https://github.com/beyer-stefan.png","language":"Go","funding_links":[],"categories":["⚙️ Middlewares"],"sub_categories":["🌱 Third Party"],"readme":"# gofiber-minifier\n\n## Introduction\nMinifier for [Fiber (\"gofiber\")](https://github.com/gofiber) supporting HTML5, CSS3, and JavaScript. \n\n\u003ca href=\"https://gofiber.io\"\u003e\n  \u003cpicture style=\"float:right; margin-right: 25px\"\u003e\n    \u003csource height=\"75\" media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo-dark.svg\"\u003e\n    \u003cimg height=\"75\" alt=\"Fiber Logo\" style=\"float: right; margin-right: 25px\" src=\"https://raw.githubusercontent.com/gofiber/docs/master/static/img/logo.svg\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n\u003e **Fiber** is an [Express](https://github.com/expressjs/express) inspired **web framework** built on top of [Fasthttp](https://github.com/valyala/fasthttp), the **fastest** HTTP engine for [Go](https://golang.org/doc/). Designed to **ease** things up for **fast** development with **zero memory allocation** and **performance** in mind.\n\n\u003e Minification is the process of removing characters like whitespaces, tab stops, or CR/LR from files without changing their meaning, ultimately shrinking file size and speeding up transmission over the internet.\n\n## Install\n```Shell\ngo get github.com/beyer-stefan/gofiber-minifier\n```\n\n## Usage\n```Golang\npackage main\n\nimport (\n\t\"github.com/gofiber/fiber\"\n\t\"github.com/beyer-stefan/gofiber-minifier\"\n)\n\nfunc main() {\n\tapp := fiber.New()\n\t(...)\n\tapp.Use(minifier.New(minifier.Config{\n\t\tMinifyHTML: true,\n\t}))\n\t// static files ...\n\t// application routes ...\n\t(...)\n}\n```\n\n### Handling Warn messages\nIf you put the minifier before your static content and your application routes\nyou will most likely see warning messages similar to this one:\n```\n(...) minifier.go:77: [Warn] minifier does not exist for mimetype 'image/jpeg'\n```\nThis is because not all mimetypes can be minified. If e.g. your static files \nconsist of JPG-images and CSS, you will get a warning message similar to one shown above\nfor all JPG-images. This can be handled in two ways:\n1. Find the right position in your code so you only minify supported mimetyes\n2. Use `SuppressWarnings` to get rid of the Warn messages\n```\n    app.Use(minifier.New(minifier.Config{\n        SuppressWarnings: true,\n        MinifyHTML: true,\n        MinifyCSS: true,\n    }))\n```\n\n## Credits \nThis project is a thin wrapper on top of [minify](https://github.com/tdewolff/minify) by [Taco de Wolff](https://github.com/tdewolff). \nHe deserves all the credit.\n\n## License\nReleased under the [MIT license](LICENSE.md).\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9810b5e4516d4df8b670da108cd01bf3)](https://app.codacy.com/gh/beyer-stefan/gofiber-minifier/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade) \n[![Go Report Card](https://goreportcard.com/badge/github.com/beyer-stefan/gofiber-minifier)](https://goreportcard.com/badge/github.com/beyer-stefan/gofiber-minifier) \n[![Mentioned in Awesome Fiber](https://awesome.re/mentioned-badge.svg)](https://github.com/gofiber/awesome-fiber)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyer-stefan%2Fgofiber-minifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyer-stefan%2Fgofiber-minifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyer-stefan%2Fgofiber-minifier/lists"}