Custom extension processing output

Hey, I’m trying to develop email templates for our transactional emails, and since we’re using Mandrill I thought to bake it’s placeholders right in so at preview/development they would be replaced by page variables, but once built, they’d stay in tact.

So imagine the following scenario:

I have a page, similar like this:

---
FIRST_NAME: Test First Name
---
<div>
  <h1>Hi, *|FIRST_NAME|*</h1>
</div>

What I’m aiming to achieve is that in development, this would get replaced, but not when building.

Any tips on how to get this done greatly appreciated.