Skip to content

Commit

Permalink
add more social media (alshedivat#878)
Browse files Browse the repository at this point in the history
alshedivat#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.
  • Loading branch information
kargaranamir authored and davidsroth committed Dec 19, 2022
1 parent 314e091 commit e34c4e9
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 2 deletions.
10 changes: 9 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,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)


# -----------------------------------------------------------------------------
Expand Down
34 changes: 33 additions & 1 deletion _includes/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand All @@ -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"
Expand Down
24 changes: 24 additions & 0 deletions _includes/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@
{%- if site.stackoverflow_id -%}
<a href="https://stackoverflow.com/users/{{ site.stackoverflow_id }}" title="Stackoverflow"><i class="fab fa-stack-overflow"></i></a>
{% endif %}
{%- if site.kaggle_id -%}
<a href="https://www.kaggle.com/{{ site.kaggle_id }}" title="Kaggle"><i class="fab fa-kaggle"></i></a>
{% endif %}
{%- if site.lastfm_id -%}
<a href="https://www.last.fm/user/{{ site.lastfm_id }}" title="Last FM"><i class="fab fa-lastfm"></i></a>
{% endif %}
{%- if site.spotify_id -%}
<a href="https://open.spotify.com/user/{{ site.spotify_id }}" title="Last FM"><i class="fab fa-spotify"></i></a>
{% endif %}
{%- if site.pinterest_id -%}
<a href="https://www.pinterest.com/{{ site.pinterest_id }}" title="Pinterest"><i class="fab fa-pinterest"></i></a>
{% endif %}
{%- if site.unsplash_id -%}
<a href="https://unsplash.com/@{{ site.unsplash_id }}" title="Unsplash"><i class="fab fa-unsplash"></i></a>
{% endif %}
{%- if site.instagram_id -%}
<a href="https://instagram.com/{{ site.instagram_id }}" title="Instagram"><i class="fab fa-instagram"></i></a>
{% endif %}
{%- if site.facebook_id -%}
<a href="https://facebook.com/{{ site.facebook_id }}" title="Facebook"><i class="fab fa-facebook"></i></a>
{% endif %}
{%- if site.discord_id -%}
<a href="https://discord.com/users/{{ site.discord_id }}" title="Discord"><i class="fab fa-discord"></i></a>
{% endif %}
{%- if site.rss_icon -%}
<a href="{{ site.baseurl }}/feed.xml" title="RSS Feed"><i class="fas fa-rss-square"></i></a>
{% endif %}

0 comments on commit e34c4e9

Please sign in to comment.