Skip to content

Commit 18d781e

Browse files
committed
Fix image/author links
1 parent af426e4 commit 18d781e

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

_includes/blog-post-card.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
1414
</a>
1515
{% if forloop.last == false %}, {% endif %}
1616
{% else %}
17-
{{ author_name }}
17+
<img
18+
src="{{ post.avatar }}"
19+
alt="{{ author.name }}" class="author-image" />
20+
{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines}}
1821
{% endif %}
1922
{% endfor %}
2023
{% endif %}

_layouts/post.html

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
1313
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
1414
{% assign author = site.data.contributors | where: "name", author_name | first %}
1515
{% assign author_link = author.name | replace: " ", "" | prepend: "/team/" %}
16-
<a href="{{ author_link }}" itemprop="url">
17-
<img src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
16+
{% if page.avatar %}
17+
<img src="{% if page.avatar %} {{ page.avatar }} {% else %}{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}{% endif %}"
1818
alt="{{ author_name }}" class="author-image" />
19-
<span itemprop="name">{{ author_name }}</span>
20-
</a>
19+
<span itemprop="name">{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines }}</span>
20+
{% else %}
21+
<a href="{{ author_link }}" itemprop="url">
22+
<img src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
23+
alt="{{ author_name }}" class="author-image" />
24+
<span itemprop="name">{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines }}</span>
25+
</a>
26+
{% endif %}
2127
{% if forloop.last == false %} , {% endif %}
2228
</span>
2329
{% endfor %} {% endif %}

_posts/2024-12-20-jank.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ and how it uses Clang and CppInterOp to stand out from the pack.
66
Discover how Clojure users develop and how jank brings that to
77
the native world."
88
sitemap: false
9-
author: Jeaye Wilkerson
9+
author: "[Jeaye Wilkerson](https://github.com/jeaye)"
10+
avatar: https://avatars.githubusercontent.com/u/1057635
1011
permalink: blogs/jank_intro/
1112
banner_image: /images/blog/jank_intro/logo.png
1213
date: 2024-12-20

0 commit comments

Comments
 (0)