The campaign front matter is a feature that brings a lot of power and flexibility to Paperboy. By prepending this metadata to the body of your campaign, you can configure your templates and various features of Paperboy itself. Paperboy supports a few different formats, each with their own delimiters.
Supported formats:
TOML Example:
+++
subject = "Announcing Paperboy 1.0"
date = "2017-04-06"
+++
Campaign content goes here
YAML Example:
---
subject: "Announcing Paperboy 1.0"
date: "2017-04-06"
---
Campaign content goes here
JSON Example:
{
"subject": "Announcing Paperboy 1.0",
"date": "2012-04-06"
}
Campaign content goes here
Variables
There are a few predefined variables that are recognized and acted on by Paperboy. The user can also create any variable they want. These will be placed into the .Params variable available to the templates. Field names are always normalized to lowercase (e.g. camelCase: true is available as .Params.camelcase).
Required | Variable | Description |
---|---|---|
✔ | subject | Campaign email subject |
✔ | date | Used for sorting/organization |
type | To Specify a particular layout |