Files
liquid/documentation/objects/blog.md
2014-07-23 09:43:56 -04:00

2.6 KiB

layout, title, nav
layout title nav
default blog
group
Liquid Variables

blog

The blog object has the following attributes: {% table_of_contents %}

{% anchor_link "blog.all_tags", "blog-all_tags" %}

Returns all tags of all articles of a blog. This includes tags of articles that are not in the current pagination view.

Input

{% highlight html %}{% raw %} {% for tag in blog.all_tags %} {{ tag }} {% endfor %} {% endraw %}{% endhighlight %}

Output

{% highlight html %}{% raw %} News, Music, Sale, Tips and Tricks {% endraw %}{% endhighlight %}

{% anchor_link "blog.articles", "blog-articles" %} Returns an array of all articles in a blog. See this page for a list of all available attributes for article.

Input

{% highlight html %}{% raw %} {% for article in blog.articles %}

{{ article.title }}

{% endfor %} {% endraw %}{% endhighlight %}

Output

{% highlight html %}{% raw %}

Hello World!

This is my second post.

Third time's a charm!

{% endraw %}{% endhighlight %}

{% anchor_link "blog.articles_count", "blog-articles_count" %} Returns the total number of articles in a blog. This total does not include hidden articles.

{% anchor_link "blog.comments_enabled?", "blog-comments_enabled?" %} Returns true if comments are enabled, or false if they are disabled.

{% anchor_link "blog.handle", "blog-handle" %} Returns the handle of the blog.

{% anchor_link "blog.id", "blog-id" %} Returns the id of the blog.

{% anchor_link "blog.moderated?", "blog-moderated?" %} Returns true if comments are moderated, or false if they are not moderated.

{% anchor_link "blog.next_article", "blog-next_article" %} Returns the URL of the next (older) post. Returns "false" if there is no next article.

{% anchor_link "blog.previous_article", "blog-previous_article" %}

Returns the URL of the previous (newer) post. Returns false if there is no next article.

{% anchor_link "blog.tags", "blog-tags" %}

Returns all tags in a blog. Similar to all_tags, but only returns tags of articles that are in the filtered view.

{% anchor_link "blog.title", "blog-title" %}

Returns the title of the blog.

{% anchor_link "blog.url", "blog-url" %}

Returns the relative URL of the blog.