Skip to content

Commit 6d11384

Browse files
authored
Merge pull request #740 from coderefinery/rkdarst/blog-descriptions
In the blog lists, also include the "description" element
2 parents ae2a1ef + 8d87915 commit 6d11384

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

templates/blog-overview.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ <h1>Blog posts</h1>
66
<ul>
77
{% set blogs = get_section(path="blog/_index.md") %}
88
{% for post in blogs.pages %}
9-
<li><a href="{{ post.permalink }}">{{ post.title }}</a> ({{ post.date }})</li>
9+
<li><a class="post-title " href="{{ post.permalink }}">{{ post.title }}</a> <span class="post-date">({{ post.date }})</span>
10+
{% if post.description %}<br>
11+
<span class="post-description">{{post.description}}</span>
12+
{% endif %}
13+
</li>
1014
{% endfor %}
1115
</ul>
1216
{% endblock content %}

templates/index/latest-blog-posts.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ <h2>Latest blog posts</h2>
44
{% set blogs = get_section(path="blog/_index.md") %}
55
{% for post in blogs.pages %}
66
{% if loop.index < 6 %}
7-
<li><a href="{{ post.permalink }}">{{ post.title }}</a> ({{ post.date }})</li>
7+
<li><a class="post-title " href="{{ post.permalink }}">{{ post.title }}</a> <span class="post-date">({{ post.date }})</span>
8+
{% if post.description %}<br>
9+
<span class="post-description">{{post.description}}</span>
10+
{% endif %}
11+
</li>
812
{% endif %}
913
{% endfor %}
1014
</ul>

0 commit comments

Comments
 (0)