-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.html
38 lines (37 loc) · 1.49 KB
/
archive.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
layout: archive
title: Archive
permalink: /archive/
---
<ul class="archive-posts-list">
{% for post in site.posts %}
{% if post.image %}
<li class="has-thumbnail">
<h4>
{% if post.image or post.image_thumbnail %}
{% assign image = post.image_thumbnail | default: post.image %}
<a href="{{ post.url | absolute_url }}" class="post-thumbnail">
<span class="thumbnail"><img src="{{ image }}"
alt="{% if post.image_alt %}{{ post.image_alt }}{% else %}{{ post.title }}{% endif %}"></span>{{ post.title }}</a>
{% else %}
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
{% endif %}
</h4>
<div class="post-meta"><time class="published" datetime="{{ post.date | date: '%Y-%m-%d' }}">{{ post.date | date: "%B %-d, %Y" }}</time></div>
{% if post.tagline %}
<p>{{ post.tagline }}</p>
{% elsif post.tags.size > 0 %}
<p class="post-tags">
{% for tag in post.tags %}<a href="{{ site.baseurl }}/tags/#{{ tag | cgi_escape }}" rel="tag">{{ tag }}</a>
{% unless forloop.last %} {% endunless %}{% endfor %}
</p>
{% comment %}
{% elsif post.categories.size > 0 %}
{% assign category = post.categories[0] %} <!-- Only allow one category! -->
<p class="post-categories"><a href="{{ site.baseurl }}/{{ category | downcase | cgi_escape }}" rel="tag">{{ category }}</a></p>
{% endcomment %}
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>