Reference
blog
avatar
The URL to your profile picture, or avatar, uploaded on the Photo page of your dashboard
<img src="{{{blog.avatar}}}" />
menu
A list of links on your site's menu, added on the Links page of your site's dashboard and pages. Each item in the list has the following properties:
id
stringUnique identifier for this link
label
stringText label for this link
url
stringURL for this link
metadata
objectThe metadata set for the page which generated this link.
active
booleantrue if you are currently looking at this link
first
booleantrue if this link is the first in your menu
penultimate
booleantrue if this link is the penultimate link in your menu
last
booleantrue if this link is the last in your menu
{{#blog.menu}}
<a href="{{url}}">{{label}}</a>
{{/blog.menu}}
scriptURL
Path to your site’s JavaScript file. It contains a query string for cache-invalidation.
entry
tags
List of tags for the entry. Each item in the list has the following properties:
tag
stringText for the tag
name
stringAlias for tag
slug
stringURL-friendly version of the tag
first
booleantrue if this tag is the first in this entry's list of tags
last
booleantrue if this link is the last in this entry's list of tags
{{#entry.tags}}
<a href="{{slug}}">{{tag}}</a>
{{/entry.tags}}
backlinks
A list of all the entries on your site which link to this entry. Each item in the list is an entry.
{{#backlinks}}
<a href="{{url}}">{{title}}</a>
{{/backlinks}}
formatDate
Used to format the entry's publication date as you like, using any of the supported date tokens.
{{#formatDate}}
MMMM DDDo, YYYY
{{/formatDate}}
formatUpdated
Used to format the entry's updated date as you like, using any of the supported date tokens.
{{#formatUpdated}}
MMMM DDDo, YYYY
{{/formatUpdated}}
formatCreated
Used to format the entry's created date as you like, using any of the supported date tokens.
{{#formatCreated}}
MMMM DDDo, YYYY
{{/formatCreated}}
thumbnail
object containing the thumbnails for the entry, if they exist. Blot will not increase the size of smaller images. The JSON added to each entry looks something like this
small
objectwhich has a width and height under 160px.
medium
objectthe default, which has a width under 640px.
large
objectwhich has a width and height under 1060px.
square
objectwhich has a width and height of 160px.
{{#thumbnail.medium}}
<img src="{{#cdn}}{{url}}
width="{{width}}"
height="{{height}}"/>
{{/thumbnail.medium}}
titleTag
If the post’s title was generated from a heading in the blog post, this property contains that heading’s HTML. For example: <h1>Your post's <em>nice</em> title</h1>
body
The HTML of the blog post, excluding the titleTag. This property is useful if you want to manipulate the HTML of the titles of your blog posts.
teaser
The HTML of the title and the first few items in the entry. You can specify the end of the teaser by inserting the special tag {{more}} into your blog post's file. Everything before more will be included in the teaser.
teaserBody
The HTML of the first few items in the entry, excluding the title. Equivalent to teaser without the titleTag.
more
A boolean value indicating if the post’s teaser property is different to its html property. This is useful for determining whether or not to show 'read more' links.
index
The index of the entry in the list of all of your entries. For example, the first entry published has an {{index}} of 1 and the 10th entry published has an {{index}} of 10.
Lists of entries
recent_entries
A list of the 30 most recent entries on your site. Each item in the list is of type entry.
{{#recent_entries}}
<a href="{{url}}">{{title}}</a>
{{/recent_entries}}
all_entries
A list of all the entries on your site. Each item in the list is of type entry.
{{#all_entries}}
<a href="{{url}}">{{title}}</a>
{{/all_entries}}
archives
A list of all the entries on your site, structured by date. Each item in the entries property of each month is of type entry.
year
stringThe year
total
numberThe number of entries in this year
s
string's' if the year has more than one entry. Use it for pluralization.
months
arrayA list of months in this year
{{#archives}}
<h2>{{year}} ({{total}} post{{s}})</h2>
{{#months}}
<h3>{{month}}</h3>
{{#entries}}
<a href="{{url}}">{{title}}</a>
{{/entries}}
{{/months}}
{{/archives}}
Lists of tags
all_tags
A list of all the tags used on your site, sorted alphabetically by tag text.
tag
stringThe tag text
slug
stringThe tag text, in a URL-friendly form
entries
arrayA list of every entry with this tag in reverse-chronological order.
total
numberThe number of entries with this tag.
{{#all_tags}}
<a href="/tagged/{{slug}}">{{tag}}</a><br>
{{/all_tags}}
popular_tags
A list of all the tags used on your site, sorted by the number of entries with each tag.
tag
stringThe tag text
slug
stringThe tag text, in a URL-friendly form
entries
arrayA list of every entry with this tag in reverse-chronological order.
total
numberThe number of entries with this tag.
{{#popular_tags}}
<a href="/tagged/{{slug}}">{{tag}}</a><br>
{{/popular_tags}}
Utilities
absoluteURLs
The same contents, with any relative URLs fully resolved. This is useful to create an RSS feed, since many clients struggle with relative URLs. For example
{{#absoluteURLs}}
{{{html}}}
{{/absoluteURLs
encodeJSON
The same contents, encoded appropriately for JSON. This is useful to create a JSON feed. You can use it like this
{{#encodeJSON}}
{{{html}}}
{{/encodeJSON}}
encodeURIComponent
This is useful for forming urls from entry properties
?text={{#encodeURIComponent}}
{{title}}
{{/encodeURIComponent}}
encodeXML
The same contents, encoded appropriately for XML. This is useful to create a RSS feed. You can use it like this
{{#encodeXML}}
{{{html}}}
{{/encodeXML}}
Date tokens
Token | Output | |
---|---|---|
Month | M | 1 2 … 11 12 |
Mo | 1st 2nd … 11th 12th | |
MM | 01 02 … 11 12 | |
MMM | Jan Feb … Nov Dec | |
MMMM | January February … November December | |
Quarter | Q | 1 2 3 4 |
Qo | 1st 2nd 3rd 4th | |
Day of Month | D | 1 2 … 30 31 |
Do | 1st 2nd … 30th 31st | |
DD | 01 02 … 30 31 | |
Day of Year | DDD | 1 2 … 364 365 |
DDDo | 1st 2nd … 364th 365th | |
DDDD | 001 002 … 364 365 | |
Day of Week | d | 0 1 … 5 6 |
do | 0th 1st … 5th 6th | |
dd | Su Mo … Fr Sa | |
ddd | Sun Mon … Fri Sat | |
dddd | Sunday Monday … Friday Saturday | |
Day of Week (Locale) | e | 0 1 … 5 6 |
Day of Week (ISO) | E | 1 2 … 6 7 |
Week of Year | w | 1 2 … 52 53 |
wo | 1st 2nd … 52nd 53rd | |
ww | 01 02 … 52 53 | |
Week of Year (ISO) | W | 1 2 … 52 53 |
Wo | 1st 2nd … 52nd 53rd | |
WW | 01 02 … 52 53 | |
Year | YY | 70 71 … 29 30 |
YYYY | 1970 1971 … 2029 2030 | |
Y | 1970 1971 … 9999 +10000 +10001
Note: This complies with the ISO 8601 standard for dates past the year 9999 |
|
Week Year | gg | 70 71 … 29 30 |
gggg | 1970 1971 … 2029 2030 | |
Week Year (ISO) | GG | 70 71 … 29 30 |
GGGG | 1970 1971 … 2029 2030 | |
AM/PM | A | AM PM |
a | am pm | |
Hour | H | 0 1 … 22 23 |
HH | 00 01 … 22 23 | |
h | 1 2 … 11 12 | |
hh | 01 02 … 11 12 | |
k | 1 2 … 23 24 | |
kk | 01 02 … 23 24 | |
Minute | m | 0 1 … 58 59 |
mm | 00 01 … 58 59 | |
Second | s | 0 1 … 58 59 |
ss | 00 01 … 58 59 | |
Fractional Second | S | 0 1 … 8 9 |
SS | 00 01 … 98 99 | |
SSS | 000 001 … 998 999 | |
SSSS … SSSSSSSSS | 000[0..] 001[0..] … 998[0..] 999[0..] | |
Time Zone | z or zz | EST CST … MST PST |
Z | -07:00 -06:00 … +06:00 +07:00 | |
ZZ | -0700 -0600 … +0600 +0700 | |
Unix Timestamp | X | 1360013296 |
Unix Millisecond Timestamp | x | 1360013296123 |