mirror of
https://github.com/saccas/mjml-typo3.git
synced 2024-12-05 03:16:09 +01:00
51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
# MJML
|
||
|
||
https://mjml.io integration for **TYPO3 EXT:Form**
|
||
|
||
MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase. MJML’s open-source engine generates high quality responsive HTML compliant with best practices. https://mjml.io/getting-started-onboard
|
||
|
||
## Installation
|
||
|
||
### Over composer:
|
||
|
||
`composer require saccas/mjml`
|
||
|
||
### NPM
|
||
|
||
Npm is needed for the conversion of the MJML file to HTML
|
||
|
||
## Usage in EXT:Form
|
||
|
||
You can overwrite the default _finishersEmailMixin_ so that he uses the _MjmlEmailFinisher_
|
||
or create your own.
|
||
|
||
```
|
||
TYPO3:
|
||
CMS:
|
||
Form:
|
||
mixins:
|
||
finishersEmailMixin:
|
||
implementationClassName: 'Saccas\Mjml\Domain\Finishers\MjmlEmailFinisher'
|
||
```
|
||
|
||
## MJML Documentation
|
||
|
||
https://mjml.io/documentation/
|
||
|
||
## Usage in your distribution
|
||
|
||
To automate the installation of the npm packages, you could add the following lines to your composer.json
|
||
|
||
```
|
||
"scripts": {
|
||
"post-install-cmd": [
|
||
"cd web/typo3conf/ext/mjml && npm prune --production"
|
||
],
|
||
"post-update-cmd": [
|
||
"cd web/typo3conf/ext/mjml && npm prune --production"
|
||
],
|
||
"pre-deploy": [
|
||
"cd web/typo3conf/ext/mjml && npm prune --production"
|
||
]
|
||
}
|
||
```
|