Blog is a special type of page, having access to all articles in this blog.
Returns list of all articles in this blog. Each list item is an article object.
Returns 10 latest blog articles. Use latest_n_articles accessor to get appropriate number of articles. Articles are ordered by create date, newer articles first.
Returns requested number of latest articles. Replace n with desirable number. Articles are ordered by creation date, newer articles first.
{% for article in blog.latest_15_articles %}
{{ article.title }}<br/>
{% endfor %}
Reference to the page object the blog is on.
Generates LINK tag for RSS-feed. Use inside HEAD tag
{{ blog.rss_link }}
#=> <link rel="alternate" type="application/rss+xml" title="RSS" href="url/to/blog.rss">
Generates url to RSS feed without generating a LINK tag:
<a href="{{ blog.rss_url }}">Subscribe to our blog</a>
#=> <a href="url/to/blog.rss">Subscribe to our blog</a>
{% if blog.has_tags? %}
{% comment %}Get the names of selected tag filters to an array.{% endcomment %}
{% if tags %}
{% assign selected_tags = tags | map: "name" %}
{% endif %}
{% comment %}Render list of links to tags in blog. Display active class if matches an active tag filter{% endcomment %}
{% for tag in blog.tags %}
<a {% if selected_tags contains tag.name %}class="active"{% endif %} href="/{{ blog.page.path_with_lang }}/tagged/{{ tag.path }}">{{ tag.name }}</a>
{% endfor %}
{% endif %}