Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blog authors without github id made unclickable #3620

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/content/_layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ <h1 id="post_title">{{ page.title | escape }}</h1>
{% if page.author_github %}
<a class="author_name" href="{{ page.author_github }}" target="_blank" rel="noopener">{{ page.author }}</a>
{% else %}
<span class="author_name">{{ page.author }}</span>
{% endif %}
<span class="author_name">{{ page.author }}</span>
{% endif %}
{% for author in page.additional_authors %}
{% if additional_author_count == 1 %}
<span>{% t global.and %}</span>
Expand Down
32 changes: 21 additions & 11 deletions src/main/content/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,14 @@ <h2 class="blog_post_title">
{% endfor %}
</div>
{% if post.author_github %}
<a class="blog_post_author_name" href="{{ post.author_github }}" rel="noopener" target="_blank">
{{ post.author }}
</a>
<a class="blog_post_author_name" href="{{ post.author_github }}" rel="noopener" target="_blank">
{{ post.author }}
</a>
{% else %}
<span class="blog_post_author_name">{{ post.author }}</span>
{% endif %}
<span class="blog_post_author_name">
{{ post.author }}
</span>
{% endif %}
{% for author in post.additional_authors %}
{% if additional_author_count == 1 %}
<span>
Expand Down Expand Up @@ -325,21 +327,29 @@ <h2 class="blog_post_title_condensed">
{% endfor %}
</div>
{% if post.author_github %}
<a class="blog_post_author_name" href="{{ post.author_github }}" rel="noopener" target="_blank">
{{ post.author }}
</a>
{% else %}
<span class="blog_post_author_name">{{ post.author }}</span>
{% endif %}
<a class="blog_post_author_name" href="{{ post.author_github }}" rel="noopener" target="_blank">
{{ post.author }}
</a>
{% else %}
<span class="blog_post_author_name">
{{ post.author }}
</span>
{% endif %}
{% for author in post.additional_authors %}
{% if additional_author_count == 1 %}
<span>
and
</span>
{% if author.github %}
<a class="blog_post_author_name" href="{{ author.github }}" rel="noopener" target="_blank">
{{ author.name }}
</a>
{% else %}
<span class="blog_post_author_name">
{{ author.name }}
</span>
{% endif %}
{% else %}
<span>
and {{ additional_author_count }} others
</span>
Expand Down
20 changes: 18 additions & 2 deletions src/main/content/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,15 @@ <h2 class="blog_post_title"><a href="{{ post.url | relative_url }}" class="blog_
{% for author in post.additional_authors %}
{% if additional_author_count == 1 %}
<span>and </span>
<a class="blog_post_author_name" href="{{ author.github }}" target="_blank" rel="noopener">{{ author.name }}</a>
{% if author.github %}
<a class="blog_post_author_name" href="{{ author.github }}" rel="noopener" target="_blank">
{{ author.name }}
</a>
{% else %}
<span class="blog_post_author_name">
{{ author.name }}
</span>
{% endif %}
{% else %}
<span>and {{ additional_author_count }} others</span>
{% break %}
Expand Down Expand Up @@ -320,7 +328,15 @@ <h2 class="blog_post_title"><a href="{{ post.url | relative_url }}" class="blog_
{% for author in post.additional_authors %}
{% if additional_author_count == 1 %}
<span>and </span>
<a class="blog_post_author_name" href="{{ author.github }}" target="_blank" rel="noopener">{{ author.name }}</a>
{% if author.github %}
<a class="blog_post_author_name" href="{{ author.github }}" rel="noopener" target="_blank">
{{ author.name }}
</a>
{% else %}
<span class="blog_post_author_name">
{{ author.name }}
</span>
{% endif %}
{% else %}
<span>and {{ additional_author_count }} others</span>
{% break %}
Expand Down
Loading