maizzle / starter-postmark

A Maizzle starter based on Postmark's transactional email templates.
MIT License
107 stars 12 forks source link

Data not being processed by posthtml #26

Open fcpauldiaz opened 5 months ago

fcpauldiaz commented 5 months ago

The company data is not being correctly shown

module.exports = {
  build: {
    posthtml: {
      expressions: {
        delimiters: ['[[', ']]'],
        unescapeDelimiters: ['[[[', ']]]'],
      }
    },
    templates: {
      source: 'src/templates',
      destination: {
        path: 'build_local',
      },
    },
  },
  company: {
    name: '[Company Name, LLC]',
    address: `
    <br>1234 Street Rd.
    <br>Suite 1234
    `,
    product: '[Product Name]',
    sender: '[Sender Name]',
  },
  year: () => new Date().getFullYear(),
}

Screenshot 2024-05-26 at 3 07 16 PM

Finkes commented 5 months ago

Since it is working fine as part of the footer, but not in the main template I noticed that this seems to be caused by the <raw> tag used by the templates. Removing the <raw> fixes the issue for me.

https://v3.maizzle.com/docs/tags/#raw