Skip to content

Advanced: settings, options and details for people who want full control. Most people only need Studio.

Placeholders ​

For people writing header and footer text who need the exact name of a placeholder or a date format token.

json
{
  "header": { "left_text": "{title}", "right_text": "{date:d MMMM yyyy}" },
  "footer": { "center_text": "Page {page} of {pages}" }
}

Syntax ​

FormExampleMeaning
{name}{title}Replaced by the value.
{name:format}{date:dd.MM.yyyy}Date or time in your own format. Only for date, time and datetime.

Names are not case sensitive. Names use letters, digits and underscores only.

Placeholders work in header and footer text: the flat keys left_text, center_text and right_text, the content of a text element and the format of page_number and total_pages elements. They are not replaced in the document body.

Built-in placeholders ​

PlaceholderPrintsExample
{page}Current page number.3
{pages}Total number of pages.12
{title}Front matter title; without it, the first # heading; without it, the file name without extension.Annual report
{author}Front matter author. A list is joined with commas. Empty when missing.Jane Smith
{filename}Markdown file name, with extension.report.md
{date}Export date, format yyyy-MM-dd.2026-06-14
{time}Export time, format HH:mm:ss.14:30:05
{datetime}Export date and time, format yyyy-MM-dd HH:mm:ss.2026-06-14 14:30:05

{date} is always the day of the export. The date: field in front matter does not change it; to print a fixed date, use a custom variable such as release_date.

Date and time use the clock and time zone of the computer that makes the PDF. Month and day names are in English.

Custom variables ​

Any other top-level field of the document's front matter becomes a placeholder:

markdown
---
title: Service agreement
client: Acme Corp
contract_no: "2026-117"
---

{client} prints Acme Corp and {contract_no} prints 2026-117.

RuleDetail
NamesLetters, digits and underscores. {contract-no} is not recognised.
CaseClient: and CLIENT: are both {client}.
ValuesText or numbers. Quote dates and codes that look like numbers.
Reservedtitle, author, date and pdf are read by the tool, not used as custom variables. Avoid page, pages, time, datetime and filename: the built-in value wins.
MissingA placeholder with no matching field is printed as written, braces included.

There is no escape for literal braces: any {word} in header text is read as a placeholder.

More in Per document.

Date formats ​

Write the format after a colon: {date:d MMMM yyyy}. The same format strings are used by the format key of a date element. Formats follow the date-fns format rules.

Examples for Sunday 14 June 2026, 14:30:05:

FormatOutput
yyyy-MM-dd2026-06-14
dd/MM/yyyy14/06/2026
MM/dd/yyyy06/14/2026
dd.MM.yyyy14.06.2026
d MMMM yyyy14 June 2026
MMMM d, yyyyJune 14, 2026
EEEE, MMMM d, yyyySunday, June 14, 2026
QQQ yyyyQ2 2026
'Week' I, yyyyWeek 24, 2026
HH:mm14:30
h:mm a2:30 PM
MMM d 'at' h:mm aJun 14 at 2:30 PM

Tokens ​

TokenMeaningOutput
yyyyYear2026
yyYear, 2 digits26
QQuarter2
QQQQuarter, shortQ2
QQQQQuarter, long2nd quarter
MMonth6
MMMonth, 2 digits06
MMMMonth, short nameJun
MMMMMonth, full nameJune
IISO week number24
wWeek number (weeks start on Sunday)25
dDay of month14
ddDay of month, 2 digits14
doDay of month, ordinal14th
E, EEEWeekday, short nameSun
EEEEWeekday, full nameSunday
EEEEEWeekday, one letterS
HHour, 0 to 2314
HHHour, 2 digits14
hHour, 1 to 122
hhHour, 1 to 12, 2 digits02
m, mmMinutes30
s, ssSeconds5, 05
aAM or PMPM
aaaam or pmpm
xxxTime zone offset+02:00
OTime zone, GMT formGMT+2

Literal text ​

Put words inside single quotes so their letters are not read as tokens. Write two single quotes for an apostrophe:

FormatOutput
'Printed on' d MMMM yyyyPrinted on 14 June 2026
'Q'Q yyyyQ2 2026
h 'o''clock'2 o'clock

Text outside the braces needs no quotes: "Printed on {date:d MMMM yyyy}" gives the same result as the first line.

Common mistakes ​

WrongRightWhy
YYYYyyyyYYYY is a week-based year. It stops the format.
DDddDD is the day of the year. It stops the format.
mm/dd/yyyyMM/dd/yyyymm is minutes, MM is the month.

An invalid format prints a warning and falls back to yyyy-MM-dd.

Named formats ​

Instead of a pattern, use one of these names, for example {date:us-long}:

NamePatternExample
isoyyyy-MM-dd2026-06-14
iso-timeHH:mm:ss14:30:00
iso-datetimeyyyy-MM-dd HH:mm:ss2026-06-14 14:30:00
usMM/dd/yyyy06/14/2026
us-longMMMM d, yyyyJune 14, 2026
us-shortM/d/yy6/14/26
eudd/MM/yyyy14/06/2026
eu-longd MMMM yyyy14 June 2026
eu-shortd/M/yy14/6/26
eu-dotdd.MM.yyyy14.06.2026
fullEEEE, MMMM d, yyyySunday, June 14, 2026
mediumMMM d, yyyyJun 14, 2026
shortM/d/yy6/14/26
yearyyyy2026
monthMMMMJune
dayd14

Released under the MIT License.