Post properties

Below is the list of properties which Blot generates for every post. Their values are determined by the file’s contents and location.


PropertyDescription
{{{html}}}The full HTML of the blog post.
{{title}}The blog post's title.
{{{url}}}The path of the URL to the post. For example:
"/your-blog-post"
{{date}}The blog post's publish date, as a human-readable string
{{dateStamp}}The blog post's publish date, as a unix timestamp.
{{path}}The file's path, with the blog's folder as root.
{{name}}The file's name, preserving the case where possible.
{{size}}The file's size in bytes.
{{created}}The file's creation date, as a Unix timestamp.
{{updated}}The file's last-modified date, as a Unix timestamp.
{{summary}}The text of the first paragraph of the entry.
{{{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.
{{slug}}The value of the metadata property permalink. Same as URL.
{{permalink}}The value of the metadata property permalink. Same as URL.
{{tags}}List of tags for the entry
{{menu}}"true" if the entry is a page on the menu, "false" if not
{{page}}"true" if the entry is a page, "false" if not
{{deleted}}"true" if the entry is deleted, "false" if not
{{draft}}"true" if the entry is a draft, "false" if not
{{scheduled}}"true" if the entry is scheduled for future publication, "false" if not
{{thumbnail}}object containing the thumbnails for the entry, if they exist.
{{metadata}}object containing the metadata for the entry, if they exist.
{{id}}Alias for the path property, which uniquely identifies the post.
{{guid}}Alpha numeric identifier

Blog properties

Blot uses these variables to render Mustache templates.

The tag…is replaced with…
{{title}}your site’s title
{{#menu}}...{{/menu}}a list containing the links on your site’s menu
{{avatar}}the URL to your site’s avatar
{{siteURL}}the URL to your site’s homepage
{{feedURL}}the URL to your site’s RSS feed
{{cssURL}}the URL to your site’s CSS file
{{scriptURL}}the URL to your site’s JS file
{{sitemapURL}}the URL to your site’s sitemap
{{cacheID}}a unix time stamp for the last change you made to your site
{{timeZone}}your site’s timezone
{{roundAvatar}}true if you’ve indicated your avatar is round, false if not
{{hideDates}}true if you’ve chosen to hide the dates on your site, false if not

Helper functions

Blot exposes some general purpose functions as Mustache lambdas. Note that you can pass another variable from the view to these functions.

The text inside the tag…is replaced with…
{{#encodeURIComponent}}...{{/encodeURIComponent}}The same text, encoded appropriately for a URI component

Lists of posts

You can uses these variables to render lists of posts

The tag…is replaced with…
{{#all_posts}}...{{/all_posts}}Every post ever published
{{#recent_posts}}...{{/recent_posts}}25 most recent posts on your site
{{#archives}}...{{/archives}}A list of years, months and the posts published on them
{{#all_tags}}...{{/all_tags}}the URL to your site’s avatar