Skip to content

mj-include - allow absolute paths Β #1546

@araphiel

Description

@araphiel

Ideal behavior

File: archive/index.mjml

  • <mj-include root="true" path="/partials/footer.mjml" />

Command: npx mjml ./archive/**/*.mjml -o ./dist

  • βœ… All files in located in a the archive will compile into the /dist folder
  • 🚫 mj-include partials are referenced from project root directory, instead of file directory.

Why?: This would allow larger teams to provide a consistent workspace + archive

β”œβ”€β”€ index.mjml // working file (untracked)
β”œβ”€β”€ partials // template partials
|    β”œβ”€β”€ header.mjml
|    └── footer.mjml
└── archive // repo of old work
    └── events
    |   └── event-email-96.mjml
    └── newletters
        β”œβ”€β”€ newsletter-55.mjml
        └── random-campaign
            └── campaign-newsletter.mjml

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