{"id":19632906,"url":"https://github.com/foundation/inky-rb","last_synced_at":"2025-05-16T12:08:30.443Z","repository":{"id":43822459,"uuid":"55104003","full_name":"foundation/inky-rb","owner":"foundation","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-16T05:01:15.000Z","size":151,"stargazers_count":174,"open_issues_count":17,"forks_count":33,"subscribers_count":20,"default_branch":"develop","last_synced_at":"2025-04-02T05:58:28.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/foundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-03-30T23:07:26.000Z","updated_at":"2025-02-11T21:19:12.000Z","dependencies_parsed_at":"2023-10-16T17:00:14.838Z","dependency_job_id":null,"html_url":"https://github.com/foundation/inky-rb","commit_stats":{"total_commits":145,"total_committers":20,"mean_commits":7.25,"dds":0.4413793103448276,"last_synced_commit":"449019402e0c652826d6e827fc6f5f1c47f1bfe4"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Finky-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Finky-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Finky-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Finky-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundation","download_url":"https://codeload.github.com/foundation/inky-rb/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994119,"owners_count":21030050,"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":[],"created_at":"2024-11-11T12:15:43.492Z","updated_at":"2025-04-09T07:04:48.958Z","avatar_url":"https://github.com/foundation.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inky\n\n[![Gem Version](https://badge.fury.io/rb/inky-rb.svg)](https://badge.fury.io/rb/inky-rb) [![Build Status](https://travis-ci.org/zurb/inky-rb.svg?branch=master)](https://travis-ci.org/zurb/inky-rb)\n\nInky is an HTML-based templating language that converts simple HTML into complex, responsive email-ready HTML. Designed for [Foundation for Emails](http://foundation.zurb.com/emails), a responsive email framework from [ZURB](http://zurb.com).\n\nTo include only the Foundation for Emails styles in your Asset Pipeline, without Inky, use the [**foundation_emails**](https://github.com/zurb/foundation-emails/#using-the-ruby-gem) gem.\n\nGive Inky simple HTML like this:\n\n```html\n\u003crow\u003e\n  \u003ccolumns large=\"6\"\u003e\u003c/columns\u003e\n  \u003ccolumns large=\"6\"\u003e\u003c/columns\u003e\n\u003c/row\u003e\n```\n\nAnd get complicated, but battle-tested, email-ready HTML like this:\n\n```html\n\u003ctable class=\"row\"\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth class=\"small-12 large-6 columns first\"\u003e\n        \u003ctable\u003e\n          \u003ctr\u003e\n            \u003cth class=\"expander\"\u003e\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/table\u003e\n      \u003c/th\u003e\n      \u003cth class=\"small-12 large-6 columns first\"\u003e\n        \u003ctable\u003e\n          \u003ctr\u003e\n            \u003cth class=\"expander\"\u003e\u003c/th\u003e\n          \u003c/tr\u003e\n        \u003c/table\u003e\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n```\n\n## Getting Started\n\nAdd the following gems to your Gemfile:\n\n```ruby\ngem 'inky-rb', require: 'inky'\n# Stylesheet inlining for email **\ngem 'premailer-rails'\n```\n\nThen execute:\n\n```bash\nbundle install\n```\n\nRun the following command to set up the required styles and mailer layout:\n\n```bash\nrails g inky:install\n```\n\nYou can specify the layout name and templating language with the following options:\n\n```\nUsage:\n  rails generate inky:install [layout_name] [options]\n\nOptions:\n  [--haml], [--no-haml]  # Generate layout in Haml\n  [--slim], [--no-slim]  # Generate layout in Slim\n```\n\nRename your email templates to use the `.inky` file extension. Note that you'll still be able to use your default\ntemplate engine within the `.inky` templates:\n\n```\nwelcome.html      =\u003e welcome.html.inky\npw_reset.html.erb =\u003e pw_reset.html.inky\n```\n\n\nYou're all set!\n\n** The majority of email clients ignore linked stylesheets. By using a CSS inliner like `premailer-rails` or `roadie`, you're able to leave your stylesheets in a separate file, keeping your markup lean.\n\n## Alternative template engine\n\nIf you do not use ERB for your views and layouts but some other markup like Haml or Slim, you can configure Inky to\nuse these languages. To do so, just set an initializer:\n\n```ruby\n# config/initializers/inky.rb\nInky.configure do |config|\n  config.template_engine = :slim\nend\n```\n\nCheck [lib/generators/inky/templates/mailer_layout.html.slim](lib/generators/inky/templates/mailer_layout.html.slim)\nfor a Slim example.\n\nYou may prefer to specify which template engine to use before inky:\n\n```\nwelcome.html.haml =\u003e welcome.html.inky-haml\npw_reset.html.erb =\u003e pw_reset.html.inky-erb\n```\n\n## Other options\n\n### Column Count\n\nYou can change the column count in the initializer too:\n\n```ruby\n# config/initializers/inky.rb\nInky.configure do |config|\n  config.column_count = 24\nend\n```\n\nMake sure to change the SASS variable as well:\n\n```sass\n# assets/stylesheets/foundation_emails.scss\n# ...\n$grid-column-count: 24;\n\n@import \"foundation-emails\";\n```\n\n## Custom Elements\n\nInky simplifies the process of creating HTML emails by expanding out simple tags like `\u003crow\u003e` and `\u003ccolumn\u003e` into full table syntax. The names of the tags can be changed with the `components` setting.\n\nHere are the names of the defaults:\n\n```ruby\n{\n  button: 'button',\n  row: 'row',\n  columns: 'columns',\n  container: 'container',\n  inky: 'inky',\n  block_grid: 'block-grid',\n  menu: 'menu',\n  center: 'center',\n  callout: 'callout',\n  spacer: 'spacer',\n  wrapper: 'wrapper',\n  menu_item: 'item'\n}\n```\n\n## Programmatic Use\n\nThe Inky parser can be accessed directly for programmatic use.\n\n## Requirements\n\nInky-rb currently requires:\n\n* Ruby 2.0+\n* Rails 3, 4, 5 or 6\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation%2Finky-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundation%2Finky-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation%2Finky-rb/lists"}