You should not edit any file in this folder. /lib: this folder will contain the compiled output of the components located in /components./components: this folder contains the custom components we will use and that we are referring to in index.mjml.index.mjml: this file is the MJML file where we will use our custom components.Now that we installed and used the boilerplate, let’s look at what’s inside. Understanding the structure of the boilerplate You just rendered your first custom components! Open the index.html file which was created in the same repository to see the 3 custom components we’ll study today. Then, go to the folder where you downloaded it: cd mjml-component-boilerplate To get you started smoothly, we created a boilerplate which will relieve you from having to do any manual setup.įirst, open a terminal and download the boilerplate with git: git clone Let’s create our first custom component together. With MJML 4, we made the creation of a custom component even simpler. This can be especially useful if you need to reuse a specific layout across your templates. However, it is also possible to create your own components. Some of those tags can be very high-level (such as mj-carousel which abstracts the complexity of having a functional carousel in an email, with all necessary fallbacks), while others are more basic ( mj-text for example). Built around components, MJML comes with a library of standard tags.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |