diff --git a/_data/authors.yml b/_data/authors.yml new file mode 100644 index 0000000..f012012 --- /dev/null +++ b/_data/authors.yml @@ -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/ diff --git a/_layouts/post.html b/_layouts/post.html index 48e1d75..e571d71 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -37,11 +37,11 @@ tail_includes:
- {% 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 %}