Skip to content

Placeholders

You may want to use dynamic values in your newsletter — that's what placeholders are for. For every custom string in config.yml, you can insert a placeholder that gets replaced with a real value in the final email.

Available placeholders

PlaceholderOld placeholder (< v1.0.0)ExampleDescriptionVersion
{{.Date}}{date}2025-06-19Date of the day. Format Y-m-d.>= v1.0.0
{{.DayName}}{day_name}MondayToday's day name, localized.>= v1.0.0
{{.DayNumber}}{day_number}19Today's day number of the month.>= v1.0.0
{{.MonthName}}{month_name}JuneCurrent month name, localized.>= v1.0.0
{{.MonthNumber}}{month_number}06Current month number.>= v1.0.0
{{.Year}}{year}2025Current year.>= v1.0.0
{{.StartDate}}{start_date}2025-05-18First date new additions are taken into account. Depends on the observed_period_days config parameter. Format Y-m-d.>= v1.0.0
{{.StartDayName}}{start_day_name}SundayDay name of the first observed date.>= v1.0.0
{{.StartDayNumber}}{start_day_number}19Day number of the first observed date.>= v1.0.0
{{.StartMonthName}}{start_month_name}MayMonth name of the first observed date.>= v1.0.0
{{.StartMonthNumber}}{start_month_number}05Month number of the first observed date.>= v1.0.0
{{.StartYear}}{start_year}2025Year of the first observed date.>= v1.0.0

TIP

Don't see what you're looking for? Open an issue to request a new placeholder.

WARNING

If you use a placeholder that doesn't exist, its key (e.g. {{.ExamplePlaceholder}}) will not be replaced and will show up literally in the final email.

Example

Let's customize the email subject. In config.yml:

yaml
[...]
email_template:
  language: "en"
  subject: "New addition of {{.MonthName}}"
[...]

Result:

Rendered subject line showing the month name placeholder replaced

TIP

Change the language field to one of the supported languages to get localized day and month names.

See also

Released under the AGPL-3.0 license License.