Plaintext
Maizzle can automatically create plaintext versions of your HTML emails.
Front Matter
Simply enable it in your config or the Template's Front Matter:
---
plaintext: true
---
<extends src="src/layouts/base.html">
<block name="template">
<!-- ... -->
</block>
</extends>
A .txt
file will be output at the same location with the compiled Template.
Using the
permalink
Front Matter key in your Template? No worries, your plaintext version will be output at the correct location.Show content only in plaintext
You can output plaintext-only content with the <plaintext>
tag:
---
plaintext: true
---
<extends src="src/layouts/base.html">
<block name="template">
This text shows in both the HTML and the plaintext versions.
<plaintext>This will be output only in the plaintext version</plaintext>
</block>
</extends>