fix: correct the twitter:creator of Twitter summary card

This commit is contained in:
Cotes Chung 2022-03-17 00:29:00 +08:00
parent 67d51d5df2
commit 96a16c868e
No known key found for this signature in database
GPG key ID: 0D9E54843167A808
2 changed files with 20 additions and 3 deletions

17
_data/authors.yml Normal file
View file

@ -0,0 +1,17 @@
## Template https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/advanced-usage.md#setting-author-url
# -------------------------------------
# {author_id}:
# name: {full name}
# twitter: {twitter_of_author}
# url: {homepage_of_author}
# -------------------------------------
cotes:
name: Cotes Chung
twitter: cotes2020
url: https://github.com/cotes2020/
sille_bille:
name: Dinesh Prasanth Moluguwan Krishnamoorthy
twitter: dinesh_MKD
url: https://github.com/SilleBille/

View file

@ -37,11 +37,11 @@ tail_includes:
<!-- author --> <!-- author -->
<div> <div>
{% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %} {% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
{% assign author_link = nil %} {% assign author_link = nil %}
{% if page.author.link %} {% if page.author %}
{% assign author_link = page.author.link %} {% assign author_link = site.data.authors[page.author].url %}
{% elsif author_name == site.social.name %} {% elsif author_name == site.social.name %}
{% assign author_link = site.social.links[0] %} {% assign author_link = site.social.links[0] %}
{% endif %} {% endif %}