Files
tabler/docs/content/emails/compiled-html.mdx

30 lines
1.6 KiB
Plaintext

---
title: Compiled templates
order: 2
seoTitle: Compiled HTML templates
description: How to use the compiled HTML email templates from the Tabler Emails package.
summary: The compiled HTML files in the Tabler Emails package are ready to send. This page shows how to change their content and where to use them.
seoDescription: The compiled HTML files in the Tabler Emails package are ready to send. This page shows how to change their content and where to use them.
---
import Example from '@components/Example.astro';
## Compiled version of the template
If you only want to change the text or the images of a template, use the compiled file, `compiled.html`. It has the styles inlined and needs only basic HTML knowledge to edit.
## How to modify the compiled HTML files
1. Open the `compiled.html` file in your favorite code editor.
2. Find the content you want to change inside the `<body>` element.
3. Modify the content as needed:
- Change the text, which is mostly placed inside the `<p>` or `<h1>` tags.
- Change the images by replacing the `src` attribute of the `<img />` tag.
- Change the links by replacing the `href` attribute of the `<a>` tag.
- Remove the HTML elements you don't need, but only if you're sure that they are not necessary for the email template to work correctly.
4. If you changed the images, make sure to replace them in the `assets/` folder.
5. Remove all the images you don't use from `assets/` to reduce the size of the email template.
## How to use the compiled HTML files
After editing, upload `compiled.html` together with the `assets/` folder to your email tool, such as Mailchimp or SendGrid.