Skip to content

Commit

Permalink
Fix image/author links
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Dec 20, 2024
1 parent af426e4 commit 18d781e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion _includes/blog-post-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
</a>
{% if forloop.last == false %}, {% endif %}
{% else %}
{{ author_name }}
<img
src="{{ post.avatar }}"
alt="{{ author.name }}" class="author-image" />
{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines}}
{% endif %}
{% endfor %}
{% endif %}
Expand Down
14 changes: 10 additions & 4 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ <h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
{% assign author = site.data.contributors | where: "name", author_name | first %}
{% assign author_link = author.name | replace: " ", "" | prepend: "/team/" %}
<a href="{{ author_link }}" itemprop="url">
<img src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
{% if page.avatar %}
<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 %}"
alt="{{ author_name }}" class="author-image" />
<span itemprop="name">{{ author_name }}</span>
</a>
<span itemprop="name">{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines }}</span>
{% else %}
<a href="{{ author_link }}" itemprop="url">
<img src="{% if author.photo %}{{ site.baseurl }}/images/team/{{ author.photo }}{% else %}{{ site.baseurl }}/images/team/defaultDP.png{% endif %}"
alt="{{ author_name }}" class="author-image" />
<span itemprop="name">{{ author_name | markdownify | remove: '<p>' | remove: '</p>' | strip_newlines }}</span>
</a>
{% endif %}
{% if forloop.last == false %} , {% endif %}
</span>
{% endfor %} {% endif %}
Expand Down
3 changes: 2 additions & 1 deletion _posts/2024-12-20-jank.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ and how it uses Clang and CppInterOp to stand out from the pack.
Discover how Clojure users develop and how jank brings that to
the native world."
sitemap: false
author: Jeaye Wilkerson
author: "[Jeaye Wilkerson](https://github.com/jeaye)"
avatar: https://avatars.githubusercontent.com/u/1057635
permalink: blogs/jank_intro/
banner_image: /images/blog/jank_intro/logo.png
date: 2024-12-20
Expand Down

0 comments on commit 18d781e

Please sign in to comment.