{"id":265,"date":"2016-03-05T13:35:55","date_gmt":"2016-03-05T19:35:55","guid":{"rendered":"http:\/\/develop.ibox.mx\/?p=265"},"modified":"2016-08-02T08:43:37","modified_gmt":"2016-08-02T13:43:37","slug":"crea-correos-responsive-con-mjml-framework","status":"publish","type":"post","link":"https:\/\/webirix.com\/en\/crea-correos-responsive-con-mjml-framework\/","title":{"rendered":"Create Email Responsive with MJML Framework"},"content":{"rendered":"<p><a href=\"https:\/\/mjml.io\/\" target=\"_blank\"><strong>MJML<\/strong><\/a>\u00a0is a framing language designed to make it easy to create responsive email templates. Its semantic syntax makes the code much easier and understandable, it is also component-based and has a library of common components for emails, which helps speed up development.<\/p>\n<p>The abstraction that MJML offers allows you to always be up to date with the standards and best practices of the industry, since it is constantly updated based on changes in the specifications of the mail clients, and this guarantees that it will always generate valid HTML code and optimized.<!--more--><\/p>\n<h2>Installation<\/h2>\n<p>MJML is written in\u00a0<strong>NodeJS<\/strong>\u00a0so to install it you only need to run the following command line in your terminal.<\/p>\n<pre>npm i -g mjml\r\n<\/pre>\n<p>This will allow you to run MJML from any location.<\/p>\n<h2>Create template<\/h2>\n<p>Once you have created your template with MJML you only need to run this command to convert it to a valid HMTL template.<\/p>\n<pre>mjml -r template.mjml\r\n<\/pre>\n<p>You can also specify a different name for the resulting template.<\/p>\n<pre>mjml -r template.mjml -o mail.html\r\n<\/pre>\n<p>If you don&#039;t want to be typing the command every time you make a change to see the result, MJML also allows you to observe and render each change.<\/p>\n<pre>mjml -w template.mjml\r\n<\/pre>\n<h2>Basic example<\/h2>\n<p>The following code is a basic example of a template with MJML code.<br \/>\nVisit the\u00a0<a href=\"https:\/\/mjml.io\/documentation\/#getting-started\">documentation<\/a>\u00a0for more information.<\/p>\n<pre>\r\n \t\r\n \t\t \r\n\t\t\t\r\n \t\t\r\n \t\r\n \t\r\n \t\t\r\n \t\t\t\r\n \t\t\tEasy and Quick Responsive Discover\r\n        \r\n \t\r\n  \r\n<\/pre>","protected":false},"excerpt":{"rendered":"<p>MJML is a framing language designed to make it easy to create responsive email templates. Its semantic syntax makes the code much easier and understandable, it is also component-based and has a library of common components for emails, which helps speed up development. The abstraction that ...<\/p>","protected":false},"author":21,"featured_media":37827,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2179,2172],"tags":[2177,2178,2180,2181],"class_list":["post-265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frameworks","category-html","tag-emails","tag-framework","tag-html","tag-responsive"],"jetpack_featured_media_url":"https:\/\/webirix.com\/wp-content\/uploads\/2016\/03\/mjml-para-crear-emails-responsive-webbizarro-interno_1457374414000_alarge.jpg","_links":{"self":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/comments?post=265"}],"version-history":[{"count":1,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/265\/revisions"}],"predecessor-version":[{"id":37828,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/265\/revisions\/37828"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/media\/37827"}],"wp:attachment":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/media?parent=265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/categories?post=265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/tags?post=265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}