Skip to content

Commit

Permalink
fix: correct the twitter:creator of Twitter summary card
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Mar 16, 2022
1 parent 67d51d5 commit 96a16c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions _data/authors.yml
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 3 additions & 3 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ <h1 data-toc-skip>{{ page.title }}</h1>

<!-- author -->
<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 %}

{% if page.author.link %}
{% assign author_link = page.author.link %}
{% if page.author %}
{% assign author_link = site.data.authors[page.author].url %}
{% elsif author_name == site.social.name %}
{% assign author_link = site.social.links[0] %}
{% endif %}
Expand Down

0 comments on commit 96a16c8

Please sign in to comment.