--- layout: default --- {% include lang.html %} {% assign pinned = site.posts | where: 'pin', 'true' %} {% assign default = site.posts | where_exp: 'item', 'item.pin != true and item.hidden != true' %} {% assign posts = '' | split: '' %} {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %} {% assign pinned_num = pinned.size | minus: offset %} {% if pinned_num > 0 %} {% for i in (offset..pinned.size) limit: pinned_num %} {% assign posts = posts | push: pinned[i] %} {% endfor %} {% else %} {% assign pinned_num = 0 %} {% endif %} {% assign default_beg = offset | minus: pinned.size %} {% if default_beg < 0 %} {% assign default_beg = 0 %} {% endif %} {% assign default_num = paginator.posts | size | minus: pinned_num %} {% assign default_end = default_beg | plus: default_num | minus: 1 %} {% if default_num > 0 %} {% for i in (default_beg..default_end) %} {% assign posts = posts | push: default[i] %} {% endfor %} {% endif %} {% capture content %} {% for post in posts %}
{% if post.image %} {% if post.image.lqip %} {% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %} {% endif %} {% assign src = post.image.path | default: post.image %} {% unless src contains '//' %} {% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %} {% endunless %} {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %} {{ alt }} {% endif %}

{{ post.title }}

{% include no-linenos.html content=post.content %} {{ content | markdownify | strip_html | truncate: 200 | escape }}

{% endfor %} {% endcapture %}
{% include refactor-content.html content=content lang=lang %}
{% if paginator.total_pages > 1 %} {% include post-paginator.html %} {% endif %}