From 93ab84322a6ff2f7009f417b3dca58b2991dc854 Mon Sep 17 00:00:00 2001 From: Amir Hossein Kargaran Date: Wed, 14 Sep 2022 05:43:46 +0300 Subject: [PATCH] add more social media (#878) #877 is an explanation of the issue. The new icons include Kaggle, LastFM, Spotify, Pinterest, Unsplash, Instagram, and Facebook, and you can change their order. --- _config.yml | 10 +++++++++- _includes/metadata.html | 34 +++++++++++++++++++++++++++++++++- _includes/social.html | 24 ++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index b8c90e7..ce7e1b8 100644 --- a/_config.yml +++ b/_config.yml @@ -83,7 +83,15 @@ work_url: # work page URL keybase_username: # your keybase user name wikidata_id: # your wikidata id dblp_url: # your DBLP profile url -stackoverflow_id: #your stackoverflow id +stackoverflow_id: # your stackoverflow id +kaggle_id: # your kaggle id +lastfm_id: # your lastfm id +spotify_id: # your spotify id +pinterest_id: # your pinterest id +unsplash_id: # your unsplash id +instagram_id: # your instagram id +facebook_id: # your facebook id +discord_id: # your discord id (18-digit unique numerical identifier) contact_note: > You can even add a little note about which of these is the best way to reach you. diff --git a/_includes/metadata.html b/_includes/metadata.html index f3431ee..f94e6cc 100644 --- a/_includes/metadata.html +++ b/_includes/metadata.html @@ -135,6 +135,38 @@ {%- capture link -%}https://stackoverflow.com/users/{{ site.stackoverflow_id }}{%- endcapture -%} {%- assign sameaslinks = sameaslinks | push: link -%} {%- endif -%} + {%- if site.kaggle_id -%} + {%- capture link -%}https://www.kaggle.com/{{ site.kaggle_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.lastfm_id -%} + {%- capture link -%}https://www.last.fm/user/{{ site.lastfm_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.spotify_id -%} + {%- capture link -%}https://open.spotify.com/user/{{ site.spotify_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.pinterest_id -%} + {%- capture link -%}https://www.pinterest.com/{{ site.pinterest_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.unsplash_id -%} + {%- capture link -%}https://unsplash.com/@{{ site.unsplash_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.instagram_id -%} + {%- capture link -%}https://instagram.com/{{ site.instagram_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.facebook_id -%} + {%- capture link -%}https://facebook.com/{{ site.facebook_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} + {%- if site.discord_id -%} + {%- capture link -%}https://discord.com/users/{{ site.discord_id }}{%- endcapture -%} + {%- assign sameaslinks = sameaslinks | push: link -%} + {%- endif -%} {%- if sameaslinks != blank -%} {%- assign sameaslinks = sameaslinks | split: "" -%} {%- endif -%} @@ -151,7 +183,7 @@ "description": "{%- if page.description -%}{{ page.description }}{%- else if site.description -%}{{ site.description }}{%- endif -%}", "headline": "{%- if page.title -%}{{ page.title }}{%- else -%}{{ site.title }}{%- endif -%}", {% if sameaslinks != blank -%} - "sameAs": {{ sameaslinks }}, + "sameAs": {{ sameaslinks }}, {%- endif %} "name": "{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}", "@context": "https://schema.org" diff --git a/_includes/social.html b/_includes/social.html index 298a68f..8c7a079 100644 --- a/_includes/social.html +++ b/_includes/social.html @@ -55,6 +55,30 @@ {%- if site.stackoverflow_id -%} {% endif %} + {%- if site.kaggle_id -%} + + {% endif %} + {%- if site.lastfm_id -%} + + {% endif %} + {%- if site.spotify_id -%} + + {% endif %} + {%- if site.pinterest_id -%} + + {% endif %} + {%- if site.unsplash_id -%} + + {% endif %} + {%- if site.instagram_id -%} + + {% endif %} + {%- if site.facebook_id -%} + + {% endif %} + {%- if site.discord_id -%} + + {% endif %} {%- if site.rss_icon -%} {% endif %}