-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
32 lines (29 loc) · 987 Bytes
/
index.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
---
layout: default
---
<div class="intro-text">
<p>This is my place to store everything I want to re-read or refer back to in the future.</p>
</div>
<h1>Recent Posts</h1>
<div class="posts">
{% assign recent_posts = site.posts | sort: 'date' | reverse | slice: 0, 20 %}
{% for post in recent_posts %}
<article class="post">
<div class="post-date">
<p>{{ post.date | date: "%B %d, %Y" }}</p>
</div>
<div class="post-title">
<h2><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2>
</div>
<div class="entry">
{% assign paragraphs = post.content | split: "</p>" %}
{% for paragraph in paragraphs limit: 2 %}
{{ paragraph | append: "</p>" }}
{% endfor %}
{% if paragraphs.size > 2 %}
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
{% endif %}
</div>
</article>
{% endfor %}
</div>