This commit is contained in:
rzen
2020-08-31 21:07:53 -04:00
parent 80d69fc179
commit 98ab475ef5
23 changed files with 455 additions and 227 deletions

View File

@ -1,22 +1,38 @@
{% assign title=(include.title | default: site.index.title)%}
{% assign title=include.title %}
{% if title == blank %}
<h1>{{ include.posts | size }} blogs since {{ include.posts | sort: 'date' | map: 'date' | compact | first | date: '%Y' }}</h1>
{% else if %}
{% if title != blank %}
<h1>{{ title }}</h1>
{% else %}
<h1>{{ include.posts | size }} blogs since {{ include.posts | sort: 'date' | map: 'date' | compact | first | date: '%Y' }}</h1>
{% endif %}
{% if site.index.intro != blank %}
{{ site.index.intro }}
{% endif %}
{% if site.index.subtitle != blank %}
<h2>{{ site.index.subtitle }}</h2>
{% endif %}
{% assign prev_year = 'first run' %}
{% assign sorted_posts = include.posts | sort: "date" | reverse %}
{% assign pinned_posts=sorted_posts | where: "pinned", 1 %}
{% if pinned_posts.size > 0 %}
<ul class="index">
{% for post in pinned_posts %}
<li>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<span class="posted">{{ post.date | date: "%b %-d, %Y" }}</span>
{% if jekyll.environment == "local" %}
{% if post.collection == 'private' %}
<span class="badge collection {{ post.collection }}">{{ post.collection }}</span>
{% endif %}
{% if post.draft %}
<span class="badge draft">draft</span>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% for post in sorted_posts %}
{% assign current_year = post.date | date: "%Y" %}