Skip to content

Commit 96a16c8

Browse files
committed
fix: correct the twitter:creator of Twitter summary card
1 parent 67d51d5 commit 96a16c8

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

_data/authors.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Template › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/advanced-usage.md#setting-author-url
2+
# -------------------------------------
3+
# {author_id}:
4+
# name: {full name}
5+
# twitter: {twitter_of_author}
6+
# url: {homepage_of_author}
7+
# -------------------------------------
8+
9+
cotes:
10+
name: Cotes Chung
11+
twitter: cotes2020
12+
url: https://github.com/cotes2020/
13+
14+
sille_bille:
15+
name: Dinesh Prasanth Moluguwan Krishnamoorthy
16+
twitter: dinesh_MKD
17+
url: https://github.com/SilleBille/

_layouts/post.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ <h1 data-toc-skip>{{ page.title }}</h1>
3737

3838
<!-- author -->
3939
<div>
40-
{% capture author_name %}{{ page.author.name | default: site.social.name }}{% endcapture %}
40+
{% capture author_name %}{{ site.data.authors[page.author].name | default: site.social.name }}{% endcapture %}
4141
{% assign author_link = nil %}
4242

43-
{% if page.author.link %}
44-
{% assign author_link = page.author.link %}
43+
{% if page.author %}
44+
{% assign author_link = site.data.authors[page.author].url %}
4545
{% elsif author_name == site.social.name %}
4646
{% assign author_link = site.social.links[0] %}
4747
{% endif %}

0 commit comments

Comments
 (0)