-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.html
More file actions
44 lines (40 loc) · 1.18 KB
/
blog.html
File metadata and controls
44 lines (40 loc) · 1.18 KB
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
39
40
41
42
43
44
---
layout: page
blog: true
title: Blog
---
<h1>Blog posts</h1>
{% assign posts = site.posts | sort: 'date' | reverse %}
{% if posts.size == 0%}
<p>Coming soon!</p>
{% endif %}
{% for post in posts %}
<article class="entry">
<div class="pure-g">
<div class="pure-u-1-5">
{{ post.date | date: "%b %-d, %Y" }}
</div>
<div class="pure-u-3-5 column-padding">
{% if post.external_url %}
<a href="{{ post.external_url }}">{{ post.title }}</a>
{% else %}
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
{% endif %}
</div>
<div class="pure-u-1-5">
{% if post.authors %}
{% assign authors = post.authors %}
{% else %}
{% assign authors = "" | split: "," %}
{% assign authors = authors | push: post.author %}
{% endif %}
{% for author in authors %}
{% if site.data.authors[author] %}
{{ site.data.authors[author].name }}{% unless forloop.last %},{% endunless %}
{% else %}
{{ author }}{% unless forloop.last %},{% endunless %}
{% endif %}
{% endfor %}
</div>
</article>
{% endfor %}