vineyard/statamic-mjml
最新稳定版本:v1.0.1
Composer 安装命令:
composer require vineyard/statamic-mjml
包简介
README 文档
README
A MJML tag for Statamic that parses MJML into HTML.
How to Install
You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:
composer require vineyard/statamic-mjml
Publish the addon's config file:
php artisan vendor:publish --provider="Vineyard\StatamicMjml\ServiceProvider"
Get an MJML API key from https://mjml.io/api. This is required. Add it to your .env file as "MJML_API_KEY" or change the API key value in your config/statamic-mjml.php file.
How to Use
In your Antlers template, wrap any chunk of MJML in a new {{ mjml }} tag and it will be converted to HTML.
{{ mjml }}
<mj-body>
<mj-section>
<mj-column>
<mj-text font-family="Helvetica" color="#F45E43">
<h1>Title</h1>
<p>Paragraph</p>
<p style="font-family:Comic Sans Ms">Another paragraph</p>
</mj-text>
</mj-column>
</mj-section>
</mj-body>
{{ /mjml }}
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-03-09