Skip to content

Add the ability to merge mj-includes, but not render to html #2465

@F21

Description

@F21

Is your feature request related to a problem? Please describe.
During development, I want to have modularity for the files I am working on, so mj-include solves the problem. In production, the mjml files will be passed through the templating system first, because depending on the conditionals within the template, the number of columns might change, which will result in the html being rendered to be different. The mjml will then be passed to a mjml rendering server, which will return the rendered html.

Describe the solution you'd like
I would like to be able to "flatten" all my mjml files when deploying for production, but not render to html, perhaps via a configuration option in the mjml cli. The reason for this is that the mjml has to pass through the template engine first. In addition, I want the mjml rendering server to be stateless for ease of deployment (everything else is written in Go). The rendering process in production would look like:

  • flattened mjml file is loaded and populated by the template engine
  • the result is then sent to a mjml rendering server
  • the html result is sent back

Describe alternatives you've considered
None.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions