{"id":15405301,"url":"https://github.com/ydah/slim-embedded-minify","last_synced_at":"2025-04-15T22:50:09.344Z","repository":{"id":180458742,"uuid":"665072415","full_name":"ydah/slim-embedded-minify","owner":"ydah","description":"A slim file to minify embedded code.","archived":false,"fork":false,"pushed_at":"2025-03-18T15:34:00.000Z","size":52,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T22:49:48.180Z","etag":null,"topics":["gem","minify","plugin","ruby","slim"],"latest_commit_sha":null,"homepage":"https://rubydoc.info/gems/slim-embedded-minify","language":"Ruby","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/ydah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"ydah"}},"created_at":"2023-07-11T11:24:16.000Z","updated_at":"2025-03-18T15:34:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3d806ec-1193-4e7d-9973-2b8f98043a65","html_url":"https://github.com/ydah/slim-embedded-minify","commit_stats":null,"previous_names":["ydah/slim-embedded-minify"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslim-embedded-minify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslim-embedded-minify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslim-embedded-minify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Fslim-embedded-minify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/slim-embedded-minify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167434,"owners_count":21223505,"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":["gem","minify","plugin","ruby","slim"],"created_at":"2024-10-01T16:15:59.460Z","updated_at":"2025-04-15T22:50:09.326Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","funding_links":["https://github.com/sponsors/ydah"],"categories":[],"sub_categories":[],"readme":"# SlimEmbeddedMinify\n\n[![Gem Version](https://badge.fury.io/rb/slim-embedded-minify.svg)](https://badge.fury.io/rb/slim-embedded-minify)\n[![test](https://github.com/ydah/slim-embedded-minify/actions/workflows/minitest.yml/badge.svg)](https://github.com/ydah/slim-embedded-minify/actions/workflows/minitest.yml)\n[![RubyDoc](https://img.shields.io/badge/%F0%9F%93%9ARubyDoc-documentation-informational.svg)](https://www.rubydoc.info/gems/slim-embedded-minify)\n\nA slim file to minify embedded code.\n\n## Overview\n\nRemove comments and unnecessary blank lines in the [css or javascript embedding](https://github.com/slim-template/slim#embedded-engines-markdown-) of your Slim files when embedding them in HTML.\n\n### Example\n\nYou have a Slim file like this:\n\n```slim\nhtml\n  head\n    title My Slim Template\n  body\n    h1 Welcome to Slim!\n    css:\n      /* Slim supports embedded css */\n\n\n      body { background-color: #ddd; }\n    javascript:\n      // Slim supports embedded javascript\n      alert('Slim supports embedded javascript!')\n```\n\nIf this gem is not applied, the HTML will look like the following:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eMy Slim Template\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003e\n      Welcome to Slim!\n    \u003c/h1\u003e\n    \u003cstyle\u003e\n      /* Slim supports embedded css */\n\n\n      body { background-color: #ddd; }\n    \u003c/style\u003e\n    \u003cscript\u003e\n      // Slim supports embedded javascript\n      alert('Slim supports embedded javascript!')\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nApplying this gem will remove unnecessary blank lines and comments:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eMy Slim Template\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003e\n      Welcome to Slim!\n    \u003c/h1\u003e\n    \u003cstyle\u003e\n      body { background-color: #ddd; }\n    \u003c/style\u003e\n    \u003cscript\u003e\n      alert('Slim supports embedded javascript!')\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\n# Gemfile\ngem 'slim'\ngem 'slim-embedded-minify'\n```\n\nAnd then execute:\n\n```\nbundle install\n```\n\n## Usage\n\nAll you have to do is add this gem to your Gemfile.\nNo additional configuration or changes to your code are required.\n\n```ruby\n# Gemfile\ngem 'slim'\ngem 'slim-embedded-minify'\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ydah/slim-embedded-minify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ydah/slim-embedded-minify/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Slim::Embedded::Minify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ydah/slim-embedded-minify/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fslim-embedded-minify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Fslim-embedded-minify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Fslim-embedded-minify/lists"}