A page data variable is a name in curly brackets, such as {postTitle}, that Ghost replaces with the data of the page a reader opens. Type one into a heading, a paragraph or a button's text on the Post template, and every post shows its own title there. Other tools call these dynamic text, merge tags or placeholders.
Use data blocks such as Title, Date and Featured Image to show one value with settings of its own. Type a variable when you need data inside your own sentence. Show the post title and other page data explains both.
How variables work
Type the name exactly, with its capital letters, such as {readingTime}. Once you type the closing bracket, the name turns into a small gray box. A name with a typo stays plain text, and your site shows it as typed.
While you edit text on the canvas, the text toolbar's Insert data button lists the Site and Date variables. Templates other than Error also offer Current page URL. Error templates offer Status code and Error message instead. A text field in the right sidebar offers the same list behind its curly brackets icon, Insert variable. The post, tag, author and tier variables are not in these lists. Use a data block to show one value, or type a variable inside your own sentence. In a sidebar text field, a dashed box with the tooltip "is not passed on this page" means the value is unavailable where the block is placed.
A link field, such as a Button's Link URL, takes these variables, which hold a link. They are {siteUrl}, {currentPageUrl}, {postUrl}, {primaryTagUrl}, {primaryAuthorUrl}, {authorUrl}, {authorWebsite}, {tagUrl} and {tierSignupUrl}. Type one alone, such as {tagUrl}, or at the start of the link, such as {siteUrl}/about/.
The image variables, {featureImage}, {primaryAuthorImage}, {authorProfileImage}, {authorCoverImage} and {tagImage}, do not work in text. Typed into text, they stay as typed. Data blocks show them, such as Featured Image and Avatar, as Data blocks lists.
Inside a Collection, the block that lists posts, tags, authors or tiers, the variables of that kind read each item in the list, on any template. A {postTitle} in a list of posts on the Homepage shows each post's own title.
The tables use these words:
Works on names the templates that have the data. "Post" means the Post template and every template you add for posts, such as one for a single post or for posts with a tag.
Elsewhere is what the variable shows on any other template, on the canvas and on your live site. A stand-in such as "Author name" is printed as it is, so use a variable only on the templates it works on. "Nothing" means the variable is left empty, so a link made from it goes nowhere.
"Can be empty" means the block that holds the variable is hidden on a page where Ghost has no value for it. A paragraph "Filed under {primaryTag}" disappears whole on a post with no tags.
Author
You type
Label
Shows
Works on
Elsewhere
{authorName}
Author name
The author's name
Author
"Author name"
{authorBio}
Author bio
The author's bio. Can be empty.
Author
"Author bio"
{authorLocation}
Author location
The author's location. Can be empty.
Author
"Author location"
{authorPostCount}
Author post count
The number of the author's posts, such as "12 posts". Can be empty.
Author
"12 posts"
{authorPostCountNumber}
Author post count (number)
The same number without the word, such as "12". Can be empty.
Author
"12"
{authorUrl}
Author page
The link to the author's page
Author
Nothing
{authorWebsite}
Author website
The author's website. Can be empty.
Author
Nothing
{authorProfileImage}
Author profile image
The author's profile picture
Author
Nothing
{authorCoverImage}
Author cover image
The author's cover image
Author
Nothing
Tag
You type
Label
Shows
Works on
Elsewhere
{tagName}
Tag name
The tag's name
Tag
"Tag name"
{tagDescription}
Tag description
The tag's description. Can be empty.
Tag
"Tag description"
{tagPostCount}
Tag post count
The number of posts with the tag, such as "12 posts". Can be empty.
Tag
"12 posts"
{tagPostCountNumber}
Tag post count (number)
The same number without the word, such as "12". Can be empty.
A page data variable is a name in curly brackets, such as
{postTitle}, that Ghost replaces with the data of the page a reader opens. Type one into a heading, a paragraph or a button's text on the Post template, and every post shows its own title there. Other tools call these dynamic text, merge tags or placeholders.Use data blocks such as Title, Date and Featured Image to show one value with settings of its own. Type a variable when you need data inside your own sentence. Show the post title and other page data explains both.
How variables work
{readingTime}. Once you type the closing bracket, the name turns into a small gray box. A name with a typo stays plain text, and your site shows it as typed.{siteUrl},{currentPageUrl},{postUrl},{primaryTagUrl},{primaryAuthorUrl},{authorUrl},{authorWebsite},{tagUrl}and{tierSignupUrl}. Type one alone, such as{tagUrl}, or at the start of the link, such as{siteUrl}/about/.{featureImage},{primaryAuthorImage},{authorProfileImage},{authorCoverImage}and{tagImage}, do not work in text. Typed into text, they stay as typed. Data blocks show them, such as Featured Image and Avatar, as Data blocks lists.{postTitle}in a list of posts on the Homepage shows each post's own title.The tables use these words:
Author
{authorName}{authorBio}{authorLocation}{authorPostCount}{authorPostCountNumber}{authorUrl}{authorWebsite}{authorProfileImage}{authorCoverImage}Tag
{tagName}{tagDescription}{tagPostCount}{tagPostCountNumber}{tagUrl}{tagImage}Tier
Tier variables work only inside a Collection that lists your tiers, such as a pricing table. Show your membership tiers and prices builds one.
{tierName}{tierDescription}{tierPrice}{tierPeriod}{tierSignupUrl}#/portal/signupPost
{postTitle}{postExcerpt}{postSummary}{postDate}{postUrl}{primaryTag}{primaryTagUrl}{postTags}{postAuthors}{readingTime}{postTiers}{primaryAuthorImage}{primaryAuthorUrl}Error
{statusCode}{message}Design your error pages uses both.
Page
{currentPageUrl}{featureImage}{featureImageCaption}Site
These come from your Ghost site's settings and work on every template and layout.
{siteTitle}{siteDescription}{siteUrl}https://example.comDate
These work on every template and layout.
{currentYear}{currentDate}A footer line such as
© {currentYear} {siteTitle}stays current with no edits.