mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Add a link to the author of the post
This commit is contained in:
@@ -16,8 +16,23 @@ tail_includes:
|
||||
|
||||
<!-- author -->
|
||||
<div>
|
||||
{% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
|
||||
{% assign author_link = nil %}
|
||||
|
||||
{% if page.author.link %}
|
||||
{% assign author_link = page.author.link %}
|
||||
{% elsif author_name == site.social.name %}
|
||||
{% assign author_link = site.social.links[0] %}
|
||||
{% endif %}
|
||||
|
||||
{{ site.data.locales[lang].post.written_by }}
|
||||
<em>{{ page.author | default: site.social.name }}</em>
|
||||
<em>
|
||||
{% if author_link %}
|
||||
<a href="{{ author_link }}">{{ author_name }}</a>
|
||||
{% else %}
|
||||
{{ author_name }}
|
||||
{% endif %}
|
||||
</em>
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
Reference in New Issue
Block a user