Skip to content

Commit ec66323

Browse files
author
~hacker
authored
Add post excerpt to home page layout (#35)
1 parent d347b48 commit ec66323

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

_layouts/home.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ <h1>recent articles</h1>
2525
{% else %}
2626
{{ post.date | date: "%b %-d, %Y" }}
2727
{% endif %}
28+
{% if site.show_excerpts == true %}
29+
<div class="post-excerpt">
30+
{{ post.content | strip_html | truncatewords: 50 }}
31+
</div>
32+
{% endif %}
2833
</div>
2934
</div>
3035
{% endfor %}

assets/css/style.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
---
44

55
@import "dash";
6+
7+
.post-excerpt {
8+
@include themed() {
9+
color: t('foreground-color');
10+
}
11+
}

0 commit comments

Comments
 (0)