Variables and limits

Page data variables

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. Tag "12"
{tagUrl} Tag page The link to the tag's page Tag Nothing
{tagImage} Tag image The tag's image. Can be empty. Tag Nothing

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.

You type Label Shows Works on Elsewhere
{tierName} Tier name The tier's name A list of tiers "Supporter"
{tierDescription} Tier description The tier's description. Can be empty. A list of tiers "Every post, and the archive."
{tierPrice} Tier price The tier's monthly price, such as "$5". Can be empty. A list of tiers "$5"
{tierPeriod} Tier period The tier's billing period, "/ month". Empty for a free tier. A list of tiers "/ month"
{tierSignupUrl} Tier sign-up A link that opens Ghost's sign-up form for the tier, with monthly payment A list of tiers #/portal/signup

Post

You type Label Shows Works on Elsewhere
{postTitle} Post title The title of the post or page Post, Page "Post title"
{postExcerpt} Post excerpt The excerpt written in Ghost Admin. Can be empty. Post, Page "Post excerpt"
{postSummary} Post summary The excerpt written in Ghost Admin, or else the start of the post's text. In a list of posts, at most 50 words of it. Can be empty. Post "Post summary"
{postDate} Post date The date the post was published, such as "Jan 15, 2026" Post "Jan 15, 2026"
{postUrl} Post page The link to the post Post Nothing
{primaryTag} Primary tag The name of the post's first tag. Can be empty. Post "Primary tag"
{primaryTagUrl} Primary tag URL The link to the first tag's page. Can be empty. Post Nothing
{postTags} Post tags The post's public tags, each one a link to its page. Can be empty. Post "News, Design"
{postAuthors} Post authors The post's first three authors, each one a link to their page Post "Sarah Chen"
{readingTime} Reading time How long the post takes to read, such as "5 min read" Post "5 min read"
{postTiers} Post tiers The tiers that can read the post, such as "Bronze and Silver tiers" Post, Page "Supporter tier"
{primaryAuthorImage} Primary author image The profile picture of the post's first author Post Nothing
{primaryAuthorUrl} Primary author page The link to the first author's page Post Nothing

Error

You type Label Shows Works on Elsewhere
{statusCode} Status code The error's number, such as 404 Error The name as you typed it, in brackets
{message} Error message Ghost's message for the error Error The name as you typed it, in brackets

Design your error pages uses both.

Page

You type Label Shows Works on Elsewhere
{currentPageUrl} Current page URL The full address of the page the reader is on Every template except Error The name as you typed it, in brackets
{featureImage} Feature image The feature image of the post or page, or on the Tag template, the tag's image Post, Page, Tag Nothing
{featureImageCaption} Feature image caption The caption of the feature image Post, Page Nothing

Site

These come from your Ghost site's settings and work on every template and layout.

You type Label Shows
{siteTitle} Site title Your site's title
{siteDescription} Site description Your site's description
{siteUrl} Site URL Your site's address, such as https://example.com

Date

These work on every template and layout.

You type Label Shows
{currentYear} Current year The year, such as 2026
{currentDate} Current date Today's date

A footer line such as © {currentYear} {siteTitle} stays current with no edits.

Was this article helpful?