Fix socials (#3241)
Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
parent
f9d8ab340c
commit
2247ec3bf2
@ -14,10 +14,10 @@ Note that since [#2048](https://github.com/alshedivat/al-folio/pull/2048) al-fol
|
||||
|
||||
To add new social media information, there are a few places you might need to modify. Currently, the template supports icons from [Academicons](https://jpswalsh.github.io/academicons/), [Font Awesome](https://fontawesome.com/), and [Tabler Icons](https://tabler.io/icons). For an example PR, check [Add HAL id to socials](https://github.com/alshedivat/al-folio/pull/3206/files). Note that the information in all these files are alphabetically sorted.
|
||||
|
||||
- _data/socials.yml - your social media information
|
||||
- _includes/metadata.liquid - add social media information to site metadata
|
||||
- _includes/social.liquid - where the social media icon will be displayed
|
||||
- _scripts/search.liquid.js - make the social media information appear in search
|
||||
- \_data/socials.yml - your social media information
|
||||
- \_includes/metadata.liquid - add social media information to site metadata
|
||||
- \_includes/social.liquid - where the social media icon will be displayed
|
||||
- \_scripts/search.liquid.js - make the social media information appear in search
|
||||
|
||||
## Issues
|
||||
|
||||
|
||||
@ -12,10 +12,10 @@ email: you@example.com # your email address
|
||||
# flickr_id: # your flickr id
|
||||
# github_username: # your GitHub user name
|
||||
# gitlab_username: # your GitLab user name
|
||||
# hal_id: # your HAL id (https://hal.science/)
|
||||
# ieee_id: # your ieeexplore.ieee.org/author/id
|
||||
inspirehep_id: 1010907 # Inspire HEP author ID
|
||||
# instagram_id: # your instagram id
|
||||
# hal_id: # your HAL id (https://hal.science/)
|
||||
# kaggle_id: # your kaggle id
|
||||
# keybase_username: # your keybase user name
|
||||
# lastfm_id: # your lastfm id
|
||||
@ -36,6 +36,7 @@ scholar_userid: qc6CJjYAAAAJ # your Google Scholar ID
|
||||
# semanticscholar_id: # your Semantic Scholar ID
|
||||
# spotify_id: # your spotify id
|
||||
# stackoverflow_id: # your stackoverflow id
|
||||
# strava_userid: # your strava user id
|
||||
# telegram_username: # your Telegram user name
|
||||
# unsplash_id: # your unsplash id
|
||||
# wechat_qr: # filename of your wechat qr-code saved as an image (e.g., wechat-qr.png if saved to assets/img/wechat-qr.png)
|
||||
|
||||
@ -80,149 +80,148 @@
|
||||
<!-- Schema.org -->
|
||||
{% comment %} Social links generator for "sameAs schema" {% endcomment %}
|
||||
{% assign sameaslinks = '' | split: ',' %}
|
||||
{% if site.orcid_id %}
|
||||
{% capture link %}https://orcid.org/{{ site.orcid_id }}{% endcapture %}
|
||||
{% for social in site.data.socials %}
|
||||
{% case social[0] %}
|
||||
{% when 'acm_id' %}
|
||||
{% capture link %}https://dl.acm.org/profile/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.scholar_userid %}
|
||||
{% capture link %}https://scholar.google.com/citations?user={{ site.scholar_userid }}{% endcapture %}
|
||||
{% when 'blogger_url' %}
|
||||
{% capture link %}{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.semanticscholar_id %}
|
||||
{% capture link %}https://www.semanticscholar.org/author/{{ site.semanticscholar_id }}{% endcapture %}
|
||||
{% when 'bluesky_url' %}
|
||||
{% capture link %}{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.publons_id %}
|
||||
{% capture link %}https://publons.com/a/{{ site.publons_id }}/{% endcapture %}
|
||||
{% when 'dblp_url' %}
|
||||
{% capture link %}{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.lattes_id %}
|
||||
{% capture link %}http://lattes.cnpq.br/{{ site.lattes_id }}{% endcapture %}
|
||||
{% when 'discord_id' %}
|
||||
{% capture link %}https://discord.com/users/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.osf_id %}
|
||||
{% capture link %}https://osf.io/{{ site.osf_id }}/{% endcapture %}
|
||||
{% when 'email' %}
|
||||
{% comment %}
|
||||
{% capture link %}mailto:{{ social[1] | encode_email }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.research_gate_profile %}
|
||||
{% capture link %}https://www.researchgate.net/profile/{{ site.research_gate_profile }}{% endcapture %}
|
||||
{% endcomment %}
|
||||
{% when 'facebook_id' %}
|
||||
{% capture link %}https://facebook.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.scopus_id %}
|
||||
{% capture link %}https://www.scopus.com/authid/detail.uri?authorId={{ site.scopus_id }}{% endcapture %}
|
||||
{% when 'flickr_id' %}
|
||||
{% capture link %}https://www.flickr.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.hal_id %}
|
||||
{% capture link %}https://cv.hal.science/{{ site.hal_id }}{% endcapture %}
|
||||
{% when 'github_username' %}
|
||||
{% capture link %}https://github.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.github_username %}
|
||||
{% capture link %}https://github.com/{{ site.github_username }}{% endcapture %}
|
||||
{% when 'gitlab_username' %}
|
||||
{% capture link %}https://gitlab.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.telegram_username %}
|
||||
{% capture link %}https://telegram.me/{{ site.telegram_username }}{% endcapture %}
|
||||
{% when 'hal_id' %}
|
||||
{% capture link %}https://cv.hal.science/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.linkedin_username %}
|
||||
{% capture link %}https://www.linkedin.com/in/{{ site.linkedin_username }}{% endcapture %}
|
||||
{% when 'ieee_id' %}
|
||||
{% capture link %}https://ieeexplore.ieee.org/author/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.x_username %}
|
||||
{% capture link %}https://twitter.com/{{ site.x_username }}{% endcapture %}
|
||||
{% when 'inspirehep_id' %}
|
||||
{% capture link %}https://inspirehep.net/authors/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.mastodon_username %}
|
||||
{% capture link %}https://{{ site.mastodon_username }}{% endcapture %}
|
||||
{% when 'instagram_id' %}
|
||||
{% capture link %}https://instagram.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.medium_username %}
|
||||
{% capture link %}https://medium.com/@{{ site.medium_username }}{% endcapture %}
|
||||
{% when 'kaggle_id' %}
|
||||
{% capture link %}https://www.kaggle.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.quora_username %}
|
||||
{% capture link %}https://www.quora.com/profile/{{ site.quora_username }}{% endcapture %}
|
||||
{% when 'keybase_username' %}
|
||||
{% capture link %}https://keybase.io/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.blogger_url %}
|
||||
{% capture link %}{{ site.blogger_url }}{% endcapture %}
|
||||
{% when 'lastfm_id' %}
|
||||
{% capture link %}https://www.last.fm/user/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.work_url %}
|
||||
{% capture link %}{{ site.work_url }}{% endcapture %}
|
||||
{% when 'lattes_id' %}
|
||||
{% capture link %}http://lattes.cnpq.br/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.wikidata_id %}
|
||||
{% capture link %}https://www.wikidata.org/wiki/{{ site.wikidata_id }}{% endcapture %}
|
||||
{% when 'leetcode_id' %}
|
||||
{% capture link %}https://leetcode.com/u/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.wikipedia_id %}
|
||||
{% capture link %}https://wikipedia.org/wiki/User:{{ site.wikipedia_id }}{% endcapture %}
|
||||
{% when 'linkedin_username' %}
|
||||
{% capture link %}https://www.linkedin.com/in/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.strava_userid %}
|
||||
{% capture link %}https://www.strava.com/athletes/{{ site.strava_userid }}{% endcapture %}
|
||||
{% when 'mastodon_username' %}
|
||||
{% capture link %}https://{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.keybase_username %}
|
||||
{% capture link %}https://keybase.io/{{ site.keybase_username }}{% endcapture %}
|
||||
{% when 'medium_username' %}
|
||||
{% capture link %}https://medium.com/@{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.gitlab_username %}
|
||||
{% capture link %}https://gitlab.com/{{ site.gitlab_username }}{% endcapture %}
|
||||
{% when 'orcid_id' %}
|
||||
{% capture link %}https://orcid.org/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.dblp_url %}
|
||||
{% capture link %}{{ site.dblp_url }}{% endcapture %}
|
||||
{% when 'osf_id' %}
|
||||
{% capture link %}https://osf.io/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.stackoverflow_id %}
|
||||
{% capture link %}https://stackoverflow.com/users/{{ site.stackoverflow_id }}{% endcapture %}
|
||||
{% when 'pinterest_id' %}
|
||||
{% capture link %}https://www.pinterest.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.kaggle_id %}
|
||||
{% capture link %}https://www.kaggle.com/{{ site.kaggle_id }}{% endcapture %}
|
||||
{% when 'publons_id' %}
|
||||
{% capture link %}https://publons.com/a/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.lastfm_id %}
|
||||
{% capture link %}https://www.last.fm/user/{{ site.lastfm_id }}{% endcapture %}
|
||||
{% when 'quora_username' %}
|
||||
{% capture link %}https://www.quora.com/profile/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.spotify_id %}
|
||||
{% capture link %}https://open.spotify.com/user/{{ site.spotify_id }}{% endcapture %}
|
||||
{% when 'research_gate_profile' %}
|
||||
{% capture link %}https://www.researchgate.net/profile/{{ social[1] }}/{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.pinterest_id %}
|
||||
{% capture link %}https://www.pinterest.com/{{ site.pinterest_id }}{% endcapture %}
|
||||
{% when 'rss_icon' %}
|
||||
{% comment %}
|
||||
{% capture link %}{{ site.baseurl }}/feed.xml{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.unsplash_id %}
|
||||
{% capture link %}https://unsplash.com/@{{ site.unsplash_id }}{% endcapture %}
|
||||
{% endcomment %}
|
||||
{% when 'scholar_userid' %}
|
||||
{% capture link %}https://scholar.google.com/citations?user={{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.instagram_id %}
|
||||
{% capture link %}https://instagram.com/{{ site.instagram_id }}{% endcapture %}
|
||||
{% when 'scopus_id' %}
|
||||
{% capture link %}https://www.scopus.com/authid/detail.uri?authorId={{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.facebook_id %}
|
||||
{% capture link %}https://facebook.com/{{ site.facebook_id }}{% endcapture %}
|
||||
{% when 'semanticscholar_id' %}
|
||||
{% capture link %}https://www.semanticscholar.org/author/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.youtube_id %}
|
||||
{% capture link %}https://youtube.com/@{{ site.youtube_id }}{% endcapture %}
|
||||
{% when 'spotify_id' %}
|
||||
{% capture link %}https://open.spotify.com/user/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.discord_id %}
|
||||
{% capture link %}https://discord.com/users/{{ site.discord_id }}{% endcapture %}
|
||||
{% when 'stackoverflow_id' %}
|
||||
{% capture link %}https://stackoverflow.com/users/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if site.zotero_username %}
|
||||
{% capture link %}https://www.zotero.org/{{ site.zotero_username }}{% endcapture %}
|
||||
{% when 'strava_userid' %}
|
||||
{% capture link %}https://www.strava.com/athletes/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% endif %}
|
||||
{% if sameaslinks != blank %}
|
||||
{% assign sameaslinks = sameaslinks | split: '' %}
|
||||
{% endif %}
|
||||
{% when 'telegram_username' %}
|
||||
{% capture link %}https://telegram.me/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'unsplash_id' %}
|
||||
{% capture link %}https://unsplash.com/@{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'whatsapp_number' %}
|
||||
{% capture link %}https://wa.me/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'wikidata_id' %}
|
||||
{% capture link %}https://www.wikidata.org/wiki/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'wikipedia_id' %}
|
||||
{% capture link %}https://wikipedia.org/wiki/User:{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'work_url' %}
|
||||
{% capture link %}{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'x_username' %}
|
||||
{% capture link %}https://twitter.com/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'youtube_id' %}
|
||||
{% capture link %}https://youtube.com/@{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% when 'zotero_username' %}
|
||||
{% capture link %}https://www.zotero.org/{{ social[1] }}{% endcapture %}
|
||||
{% assign sameaslinks = sameaslinks | push: link %}
|
||||
{% else %}
|
||||
{% assign sameaslinks = sameaslinks | push: social[1].url %}
|
||||
{% endcase %}
|
||||
{% endfor %}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
@ -236,7 +235,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 | jsonify }},
|
||||
{% endif %}
|
||||
"name": "{{ author_name }}",
|
||||
"@context": "https://schema.org"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user