HTML Filters
- blog_feed_link_tags
- feed_link_tag
- google_javascript
- google_javascripts
- ie_javascript
- gravatar
- ie_javascripts
- ie_stylesheet
- ie_stylesheets
- javascript
- javascripts
- link_to_item
- link_to_item_with_widont
- link_to_label
- linked_item_sentence
- linked_label_sentence
- stylesheet
- stylesheets
blog_feed_link_tags
Output a list of <link />
tags for the head of your template which point to the feed of every blog on your site.
Expects: Site object
{{ site | blog_feed_link_tags }}
<link href="/pathto/blog-1/feed/" rel="alternate" title="Blog 1 Name" type="application/atom+xml" />
<link href="/pathto/blog-2/feed/" rel="alternate" title="Blog 2 Name" type="application/atom+xml" />
<link href="/pathto/blog-3/feed/" rel="alternate" title="Blog 3 Name" type="application/atom+xml" />
feed_link_tag
Output a <link />
tag for the head of your template which point to the feed of the passed blog.
Expects: Blog object
{{ blog | feed_link_tag }}
<link href="/pathto/blog/feed/" rel="alternate" title="Blog Name" type="application/atom+xml" />
google_javascript
Links to a JavaScript file from the Google AJAX API. You may specify to link to the uncompressed version. For all available scripts and versions, visit the Google AJAX API documentation page.
Expects: String
Argument | Required | Description |
---|---|---|
compressed | optional | Ask for the compressed version, defaults to true |
{{ 'jquery.1.3.2' | google_javascript }}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
{{ 'chrome-frame.1.0.2' | google_javascript: false }}
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.js" type="text/javascript"></script>
google_javascripts
Links to multiple JavaScript files from the Google AJAX API, from a comma separated list. You may specify to link to the uncompressed versions. For all available scripts and versions, visit the Google AJAX API documentation page.
Expects: String
Argument | Required | Description |
---|---|---|
compressed | optional | Ask for the compressed version, defaults to true |
{{ 'jquery.1.3.2,jqueryui.1.7.2' | google_javascripts }}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
{{ 'jquery.1.3.2,jqueryui.1.7.2' | google_javascripts: false }}
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery-ui.js" type="text/javascript"></script>
ie_javascript
Links to a JavaScript file on your site which is contained in an IE conditional comment. Versions may be specified.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Describe the targeted versions of the conditional comment |
{{ 'ie' | ie_javascript }}
<!--[if IE]><script src="/theme/4b16c2c4cf395c1125000005/javascripts/ie.js" type="text/javascript"></script><![endif]-->
{{ 'ie' | ie_javascript: '<= 7' }}
<!--[if lte IE 7]><script src="/theme/4b16c2c4cf395c1125000005/javascripts/ie.js" type="text/javascript"></script><![endif]-->
gravatar
Creates an image tag pointing to the gravatar image of the users or comment authors email. Allows you to specify size and default image.
Expects: User, Comment or String
Argument | Required | Description |
---|---|---|
size | optional | The width of the resulting image |
default_url | optional | The url to the image to use if no gravatar exists for the passed user |
{{ comment | gravatar }}
<img src="http://www.gravatar.com/avatar/ae14cc4491ac334f9cd23f9f93b4305e" alt="Steve Smith" />
{{ 'john@doe.com' | gravatar }}
<img alt="6a6c19fea4a3676970167ce51f39e6ee?s=50" src="http://www.gravatar.com/avatar/6a6c19fea4a3676970167ce51f39e6ee?s=50">
ie_javascripts
Links to multiple JavaScript files on your site, from a comma separated list, which will be contained in an IE conditional comment. Versions may be specified. Javascripts will be concatenated into one file to reduce the number of requests for client-side performance.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Describe the targeted versions of the conditional comment |
{{ 'ie,special' | ie_javascripts }}
<!--[if IE]>
<script src="/theme/4b16c2c4cf395c1125000005/javascripts/ie.js" type="text/javascript"></script>
<script src="/theme/4b16c2c4cf395c1125000005/javascripts/special.js" type="text/javascript"></script>
<![endif]-->
{{ 'ie,special' | ie_javascript: '<= 7' }}
<!--[if lte IE 7]>
<script src="/theme/4b16c2c4cf395c1125000005/javascripts/ie,special.js" type="text/javascript"></script>
<![endif]-->
ie_stylesheet
Links to a Stylesheet file on your site which is contained in an IE conditional comment. Versions may be specified.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Describe the targeted versions of the conditional comment |
string | optional | Media types for the stylesheet link |
{{ 'ie' | ie_stylesheet }}
<!--[if IE]><link href="/theme/4b16c2c4cf395c1125000005/stylesheets/ie.css" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
{{ 'ie' | ie_stylesheet: '<= 7', 'print' }}
<!--[if lte IE 7]><link href="/theme/4b16c2c4cf395c1125000005/stylesheets/ie.css" media="print" rel="stylesheet" type="text/css" /><![endif]-->
ie_stylesheets
Links to multiple Stylesheet files on your site, from a comma separated list, which will be contained in an IE conditional comment. Versions may be specified. Stylesheets will be concatenated into one file to reduce the number of requests for client-side performance.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Describe the targeted versions of the conditional comment |
string | optional | Media types for the stylesheet link |
{{ 'ie,special' | ie_stylesheets }}
<!--[if IE]>
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/ie.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/special.css" media="screen" rel="stylesheet" type="text/css" />
<![endif]-->
{{ 'ie,print' | ie_stylesheets: '<= 7', 'print' }}
<!--[if lte IE 7]>
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/ie,print.css" media="print" rel="stylesheet" type="text/css" />
<![endif]-->
javascript
Links to a JavaScript file on your site.
Expects: String
{{ 'jquery' | javascript }}
<script src="/theme/4b16c2c4cf395c1125000005/javascripts/jquery.js" type="text/javascript"></script>
javascripts
Links to multiple JavaScript file on your site, from a comma separated list, and concatenates them into one file to reduce the number of requests for client-side performance. This should not be used with remote javascripts that are outside of your current theme. For remote scripts, please use the singular javascript filter.
Expects: String
{{ 'jquery,site' | javascripts }}
<script src="/theme/4b16c2c4cf395c1125000005/javascripts/jquery,site.js" type="text/javascript"></script>
link_to_item
Creates a link to an item on your site, based on that items object.
Expects: Item object
{{ site.root | link_to_item }}
<a href="/">Home Page Title</a>
link_to_item_with_widont
Creates a link to an item on your site, based on that items object. Passes the item’s title through the widont filter.
Expects: Item object
{{ site.root | link_to_item_with_widont }}
<a href="/">Home Page Title</a>
link_to_label
Creates a link to a label on a blog in your site. The ‘blog’ variable must be defined to a particular blog in your site.
Expects: String
Argument | Required | Description |
---|---|---|
blog | required | A blog object to use in the label link |
{{ 'html' | link_to_label: blog }}
<a href="/blog/labels/html/">html</a>
linked_item_sentence
Creates a list of links, in sentence form, to all items in an array.
Expects: Array of items
{{ item.children | linked_item_sentence }}
<a href="/item/child-1/">Child 1 Title</a>, <a href="/item/child-2/">Child 2 Title</a>, and <a href="/item/child-3/">Child 3 Title</a>
linked_label_sentence
Creates a list of links, in sentence form, for all labels in a post.
Expects: Post
{{ item | linked_label_sentence }}
<a href="/blog/labels/label-1/">Label 1</a>, <a href="/blog/labels/label-2/">Label 2</a>, and <a href="/blog/labels/label-3/">Label 3</a>
stylesheet
Links to a Stylesheet file on your site. Media types may be specified.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Media types for the stylesheet link |
{{ 'master' | stylesheet }}
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/master.css" media="screen" rel="stylesheet" type="text/css" />
{{ 'print' | stylesheet: 'print' }}
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
stylesheets
Links to multiple Stylesheet files on your site from a comma separated list, and concatenates them into one file to reduce the number of requests for client-side performance. Media types may be specified.
Expects: String
Argument | Required | Description |
---|---|---|
string | optional | Media types for the stylesheet link |
{{ 'master,type' | stylesheets }}
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/master,type.css" media="screen" rel="stylesheet" type="text/css" />
{{ 'print,altprint' | stylesheet: 'print' }}
<link href="/theme/4b16c2c4cf395c1125000005/stylesheets/print,altprint.css" media="print" rel="stylesheet" type="text/css" />