Back to Manual

Pika Variables

You can use various special variables in your posts and pages to do things like add some recent blog posts to a custom home page. Note: They don’t work inside inline code or code blocks. Here’s what Pika supports:


Output your blog posts

There are three variables to output your blog posts:

They can all be customized by a number of parameters, like this example:

{{ posts limit: 10 skip: 5 tag: "Bill Murray" without_tag: "Chevy Chase" has_title: yes sent_as_newsletter: no sort: alpha }}

Parameters

limit
Maximum number of posts to display (defaults to 500 if not specified).
skip
Skip the first n posts.
tag
Only include posts with the specified tag.
without_tag
Exclude posts with the specified tag.
has_title
yes (only posts with titles) or no (only posts without titles).
sent_as_newsletter
yes (only posts sent as newsletters) or no (only posts not sent as newsletters).
sort
Use alpha to override the default sorting by date. This parameter only works with the {{ posts }} variable.
with_excerpts
Use no to override the default, which is yes (showing excerpts with “Continue reading” links). This parameter only works with the {{ posts_in_stream }} variable.

Output your blog tags

There are two variables to output your blog post tags:

Parameters

separator
Use a custom tag separator in place of a comma in the {{ tags }} variable. Example: {{ tags separator: " | " }}.

Output your Letterbird contact form

Letterbird is another service from Good Enough that allows you to create a simple contact form. While it has its own embed code, Pika has a first-class variable for you to embed your form (like on a contact page):

{{ letterbird_form user: yourusername }}

Parameters

user
Your Letterbird username. This is a required parameter.
showheader
Include your Letterbird form header.

Output your Newsletter subscribe form

While there’s an option in Newsletter Settings to automatically include your subscription form on your site, you can also embed your form anywhere with this variable:

{{ newsletter_subscription_form }}

There are no parameters for this variable.