📖
Genèse
  • Quick Start
  • Templates
    • Template
    • Injection
    • Conditional rendering
    • Frontmatter
  • Generators
    • Generator
    • Prompt
Powered by GitBook
On this page
  • Header
  • Body
  1. Templates

Template

PreviousQuick StartNextInjection

Last updated 3 years ago

A genese template is powered by Twig with a Frontmatter header.

---
to: app/emails/{{ name }}.html
---

Hello {{ name }},
{{ message }}
(version {{ version }})

In this example, a file app/emails/xxx.html will be generated according to your parameters.

Header

The Frontmatter section is delimited by --- at the top of the template.

It defines the template metadata in the YAML format.

You can find a complete reference .

Body

The body of the template contains whatever content you need to generate.

Just keep in mind that it's processed by Twig.

So in the case you need to generate some Twig templates, remember to escape some brackets.

You can find the documentation .

here
here