{% if include.object.category %} {% assign posts = site.categories[include.object.category] | sort: 'date' | reverse %} {% elsif include.posts %} {% assign posts = include.posts | sort: 'date' | reverse %} {% elsif include.object.posts %} {% assign posts = include.object.posts | sort: 'date' | reverse %} {% else %} {% assign posts = site.posts | sort: 'date' | reverse %} {% endif %} {% if include.object.limit %} {% assign post_limit = include.object.limit %} {% else %} {% assign post_limit = site.post_limit %} {% endif %}
{% for post in posts limit: post_limit %} {% assign timeframe = 604800 %} {% assign post_in_seconds = post.date | date: "%s" | plus: 0 %} {% assign recent_posts = "now" | date: "%s" | minus: timeframe %} {% if forloop.first %}
{% if post.image %} {% assign block_image = post.image %} {% capture block_image_alt %}{{post.title}} image {% endcapture %} {% else %} {% assign block_image = site.post_placeholder %} {% capture block_image_alt %}Blog post placeholder image {% endcapture %} {% endif %} {% picture featured_blog_image {{block_image}} --alt {{block_image_alt}} %}
{% assign author = site.authors | where: "username", post.author | first %} {% assign author-url = author.url %} {% if author.image %} {% assign author_image = author.image %} {% else %} {% assign author_image = site.avatar_placeholder %} {% endif %} {% capture image_alt %}{{author.name}} profile image{% endcapture %}
{{author.name}}
{% picture author_thumbnail_small {{author_image}} --alt {{image_alt}} %}
{{post.title}}
{{ post.date | date: "%A, %B %-d, %Y"}}
{% if page.tags_enabled %} {% assign post_tags = post.tags | sort %} {% for tag in post_tags limit: site.tag_limit %} {{tag}} {% endfor %} {% endif %}

{% if post.description %} {{post.description | truncate: 184 }} {% else %} {{ post.content | strip_html | truncate: 184 }} {% endif %}

{{site[site.active_lang].read}}

{% else %}
{% if post.image %} {% assign block_image = post.image %} {% capture block_image_alt %}{{post.title}} image {% endcapture %} {% else %} {% assign block_image = site.post_placeholder %} {% capture block_image_alt %}Blog post placeholder image {% endcapture %} {% endif %} {% picture featured_blog_image {{block_image}} --alt {{block_image_alt}} %}
{% assign author = site.authors | where: "username", post.author | first %} {% assign author-url = author.url %} {% if author.image %} {% assign author_image = author.image %} {% else %} {% assign author_image = site.avatar_placeholder %} {% endif %} {% capture image_alt %}{{author.name}} profile image{% endcapture %}
{{author.name}}
{% picture author_thumbnail_small {{author_image}} --alt {{image_alt}} %}
{{post.title}}
{{ post.date | date: "%A, %B %-d, %Y"}}
{% include blog/read_time.html content=post.content %}

{% if post.description %} {{post.description | strip_html | truncatewords:30 }} {% else %} {{ post.content | strip_html | truncatewords:30 }} {% endif %}

{% if page.tags_enabled %} {% assign post_tags = post.tags | sort %}
{% for tag in post_tags limit: site.tag_limit %} {{tag}} {% endfor %}
{% endif %}
{% endif %} {% endfor %}