Skip to content

Commit 5bf2176

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 9cdd4eb + a7f486f commit 5bf2176

15 files changed

Lines changed: 299 additions & 159 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ If you would like to implement a new feature or a bug, please make sure you (or
1010

1111
Note that since [#2048](https://github.com/alshedivat/al-folio/pull/2048) al-folio uses the [prettier formatter](https://prettier.io/) for its code, meaning all new submitted code must conform to its standard. If you don't have `prettier` installed for your setup and the `prettier` code check fails when submitting a PR, you can check the referred failed action in our repo. In that action there will be an artifact with an HTML diff showing the needed changes.
1212

13+
### Adding new social media information
14+
15+
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.
16+
17+
- \_data/socials.yml - your social media information
18+
- \_includes/metadata.liquid - add social media information to site metadata
19+
- \_includes/social.liquid - where the social media icon will be displayed
20+
- \_scripts/search.liquid.js - make the social media information appear in search
21+
1322
## Issues
1423

1524
We use GitHub issues to track bugs and feature requests.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ Feel free to add your own page(s) by sending a PR.
164164
<a href="https://d-jiao.github.io/" target="_blank">★</a>
165165
<a href="https://cbuelt.github.io/" target="_blank">★</a>
166166
<a href="https://mehrdad-noori.github.io/" target="_blank">★</a>
167+
<a href="https://arthurclerjon.github.io/" target="_blank">★</a>
168+
<a href="https://eilamshapira.com/" target="_blank">★</a>
167169
</td>
168170
</tr>
169171
<tr>

_data/socials.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ email: animesh.garg@gatech.edu # your email address
1212
# flickr_id: # your flickr id
1313
github_username: animesh-garg # your GitHub user name
1414
# gitlab_username: # your GitLab user name
15+
# hal_id: # your HAL id (https://hal.science/)
1516
# ieee_id: # your ieeexplore.ieee.org/author/id
1617
# inspirehep_id: 1010907 # Inspire HEP author ID
1718
# instagram_id: # your instagram id
@@ -35,6 +36,7 @@ scholar_userid: zp8V7ZMAAAAJ # your Google Scholar ID
3536
# semanticscholar_id: 1873736 # your Semantic Scholar ID
3637
# spotify_id: # your spotify id
3738
# stackoverflow_id: # your stackoverflow id
39+
# strava_userid: # your strava user id
3840
# telegram_username: # your Telegram user name
3941
# unsplash_id: # your unsplash id
4042
# 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)

_includes/distill_scripts.liquid

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
crossorigin="anonymous"
1414
></script>
1515

16+
<!-- Custom overrides -->
17+
<script src="{{ '/assets/js/distillpub/overrides.js' | relative_url }}"></script>
18+
1619
{% if page.mermaid and page.mermaid.enabled %}
1720
<!-- Mermaid and D3 -->
1821
<script

_includes/giscus.liquid

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
<div id="giscus_thread" style="max-width: {{ site.max_width }}; margin: 0 auto;">
1+
<div
2+
id="giscus_thread"
3+
{% if page.layout == 'post' %}
4+
style="max-width: {{ site.max_width }}; margin: 0 auto;"
5+
{% endif %}
6+
>
7+
{% if page.layout == 'post' %}
8+
<br>
9+
{% endif %}
10+
211
{% if site.giscus.repo %}
312
<script>
413
let giscusTheme = determineComputedTheme();

_includes/head.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url | bust_css_cache }}">
7070
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
7171

72-
<!-- Dark Mode -->
73-
<script src="{{ '/assets/js/theme.js' | relative_url | bust_file_cache }}"></script>
7472
{% if site.enable_darkmode %}
73+
<!-- Dark Mode -->
74+
<script src="{{ '/assets/js/theme.js' | relative_url | bust_file_cache }}"></script>
7575
<link
7676
defer
7777
rel="stylesheet"

_includes/metadata.liquid

Lines changed: 143 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -80,145 +80,148 @@
8080
<!-- Schema.org -->
8181
{% comment %} Social links generator for "sameAs schema" {% endcomment %}
8282
{% assign sameaslinks = '' | split: ',' %}
83-
{% if site.orcid_id %}
84-
{% capture link %}https://orcid.org/{{ site.orcid_id }}{% endcapture %}
85-
{% assign sameaslinks = sameaslinks | push: link %}
86-
{% endif %}
87-
{% if site.scholar_userid %}
88-
{% capture link %}https://scholar.google.com/citations?user={{ site.scholar_userid }}{% endcapture %}
89-
{% assign sameaslinks = sameaslinks | push: link %}
90-
{% endif %}
91-
{% if site.semanticscholar_id %}
92-
{% capture link %}https://www.semanticscholar.org/author/{{ site.semanticscholar_id }}{% endcapture %}
93-
{% assign sameaslinks = sameaslinks | push: link %}
94-
{% endif %}
95-
{% if site.publons_id %}
96-
{% capture link %}https://publons.com/a/{{ site.publons_id }}/{% endcapture %}
97-
{% assign sameaslinks = sameaslinks | push: link %}
98-
{% endif %}
99-
{% if site.lattes_id %}
100-
{% capture link %}http://lattes.cnpq.br/{{ site.lattes_id }}{% endcapture %}
101-
{% assign sameaslinks = sameaslinks | push: link %}
102-
{% endif %}
103-
{% if site.osf_id %}
104-
{% capture link %}https://osf.io/{{ site.osf_id }}/{% endcapture %}
105-
{% assign sameaslinks = sameaslinks | push: link %}
106-
{% endif %}
107-
{% if site.research_gate_profile %}
108-
{% capture link %}https://www.researchgate.net/profile/{{ site.research_gate_profile }}{% endcapture %}
109-
{% assign sameaslinks = sameaslinks | push: link %}
110-
{% endif %}
111-
{% if site.scopus_id %}
112-
{% capture link %}https://www.scopus.com/authid/detail.uri?authorId={{ site.scopus_id }}{% endcapture %}
113-
{% assign sameaslinks = sameaslinks | push: link %}
114-
{% endif %}
115-
{% if site.github_username %}
116-
{% capture link %}https://github.com/{{ site.github_username }}{% endcapture %}
117-
{% assign sameaslinks = sameaslinks | push: link %}
118-
{% endif %}
119-
{% if site.telegram_username %}
120-
{% capture link %}https://telegram.me/{{ site.telegram_username }}{% endcapture %}
121-
{% assign sameaslinks = sameaslinks | push: link %}
122-
{% endif %}
123-
{% if site.linkedin_username %}
124-
{% capture link %}https://www.linkedin.com/in/{{ site.linkedin_username }}{% endcapture %}
125-
{% assign sameaslinks = sameaslinks | push: link %}
126-
{% endif %}
127-
{% if site.x_username %}
128-
{% capture link %}https://twitter.com/{{ site.x_username }}{% endcapture %}
129-
{% assign sameaslinks = sameaslinks | push: link %}
130-
{% endif %}
131-
{% if site.mastodon_username %}
132-
{% capture link %}https://{{ site.mastodon_username }}{% endcapture %}
133-
{% assign sameaslinks = sameaslinks | push: link %}
134-
{% endif %}
135-
{% if site.medium_username %}
136-
{% capture link %}https://medium.com/@{{ site.medium_username }}{% endcapture %}
137-
{% assign sameaslinks = sameaslinks | push: link %}
138-
{% endif %}
139-
{% if site.quora_username %}
140-
{% capture link %}https://www.quora.com/profile/{{ site.quora_username }}{% endcapture %}
141-
{% assign sameaslinks = sameaslinks | push: link %}
142-
{% endif %}
143-
{% if site.blogger_url %}
144-
{% capture link %}{{ site.blogger_url }}{% endcapture %}
145-
{% assign sameaslinks = sameaslinks | push: link %}
146-
{% endif %}
147-
{% if site.work_url %}
148-
{% capture link %}{{ site.work_url }}{% endcapture %}
149-
{% assign sameaslinks = sameaslinks | push: link %}
150-
{% endif %}
151-
{% if site.wikidata_id %}
152-
{% capture link %}https://www.wikidata.org/wiki/{{ site.wikidata_id }}{% endcapture %}
153-
{% assign sameaslinks = sameaslinks | push: link %}
154-
{% endif %}
155-
{% if site.wikipedia_id %}
156-
{% capture link %}https://wikipedia.org/wiki/User:{{ site.wikipedia_id }}{% endcapture %}
157-
{% assign sameaslinks = sameaslinks | push: link %}
158-
{% endif %}
159-
{% if site.strava_userid %}
160-
{% capture link %}https://www.strava.com/athletes/{{ site.strava_userid }}{% endcapture %}
161-
{% assign sameaslinks = sameaslinks | push: link %}
162-
{% endif %}
163-
{% if site.keybase_username %}
164-
{% capture link %}https://keybase.io/{{ site.keybase_username }}{% endcapture %}
165-
{% assign sameaslinks = sameaslinks | push: link %}
166-
{% endif %}
167-
{% if site.gitlab_username %}
168-
{% capture link %}https://gitlab.com/{{ site.gitlab_username }}{% endcapture %}
169-
{% assign sameaslinks = sameaslinks | push: link %}
170-
{% endif %}
171-
{% if site.dblp_url %}
172-
{% capture link %}{{ site.dblp_url }}{% endcapture %}
173-
{% assign sameaslinks = sameaslinks | push: link %}
174-
{% endif %}
175-
{% if site.stackoverflow_id %}
176-
{% capture link %}https://stackoverflow.com/users/{{ site.stackoverflow_id }}{% endcapture %}
177-
{% assign sameaslinks = sameaslinks | push: link %}
178-
{% endif %}
179-
{% if site.kaggle_id %}
180-
{% capture link %}https://www.kaggle.com/{{ site.kaggle_id }}{% endcapture %}
181-
{% assign sameaslinks = sameaslinks | push: link %}
182-
{% endif %}
183-
{% if site.lastfm_id %}
184-
{% capture link %}https://www.last.fm/user/{{ site.lastfm_id }}{% endcapture %}
185-
{% assign sameaslinks = sameaslinks | push: link %}
186-
{% endif %}
187-
{% if site.spotify_id %}
188-
{% capture link %}https://open.spotify.com/user/{{ site.spotify_id }}{% endcapture %}
189-
{% assign sameaslinks = sameaslinks | push: link %}
190-
{% endif %}
191-
{% if site.pinterest_id %}
192-
{% capture link %}https://www.pinterest.com/{{ site.pinterest_id }}{% endcapture %}
193-
{% assign sameaslinks = sameaslinks | push: link %}
194-
{% endif %}
195-
{% if site.unsplash_id %}
196-
{% capture link %}https://unsplash.com/@{{ site.unsplash_id }}{% endcapture %}
197-
{% assign sameaslinks = sameaslinks | push: link %}
198-
{% endif %}
199-
{% if site.instagram_id %}
200-
{% capture link %}https://instagram.com/{{ site.instagram_id }}{% endcapture %}
201-
{% assign sameaslinks = sameaslinks | push: link %}
202-
{% endif %}
203-
{% if site.facebook_id %}
204-
{% capture link %}https://facebook.com/{{ site.facebook_id }}{% endcapture %}
205-
{% assign sameaslinks = sameaslinks | push: link %}
206-
{% endif %}
207-
{% if site.youtube_id %}
208-
{% capture link %}https://youtube.com/@{{ site.youtube_id }}{% endcapture %}
209-
{% assign sameaslinks = sameaslinks | push: link %}
210-
{% endif %}
211-
{% if site.discord_id %}
212-
{% capture link %}https://discord.com/users/{{ site.discord_id }}{% endcapture %}
213-
{% assign sameaslinks = sameaslinks | push: link %}
214-
{% endif %}
215-
{% if site.zotero_username %}
216-
{% capture link %}https://www.zotero.org/{{ site.zotero_username }}{% endcapture %}
217-
{% assign sameaslinks = sameaslinks | push: link %}
218-
{% endif %}
219-
{% if sameaslinks != blank %}
220-
{% assign sameaslinks = sameaslinks | split: '' %}
221-
{% endif %}
83+
{% for social in site.data.socials %}
84+
{% case social[0] %}
85+
{% when 'acm_id' %}
86+
{% capture link %}https://dl.acm.org/profile/{{ social[1] }}/{% endcapture %}
87+
{% assign sameaslinks = sameaslinks | push: link %}
88+
{% when 'blogger_url' %}
89+
{% capture link %}{{ social[1] }}{% endcapture %}
90+
{% assign sameaslinks = sameaslinks | push: link %}
91+
{% when 'bluesky_url' %}
92+
{% capture link %}{{ social[1] }}{% endcapture %}
93+
{% assign sameaslinks = sameaslinks | push: link %}
94+
{% when 'dblp_url' %}
95+
{% capture link %}{{ social[1] }}{% endcapture %}
96+
{% assign sameaslinks = sameaslinks | push: link %}
97+
{% when 'discord_id' %}
98+
{% capture link %}https://discord.com/users/{{ social[1] }}{% endcapture %}
99+
{% assign sameaslinks = sameaslinks | push: link %}
100+
{% when 'email' %}
101+
{% comment %}
102+
{% capture link %}mailto:{{ social[1] | encode_email }}{% endcapture %}
103+
{% assign sameaslinks = sameaslinks | push: link %}
104+
{% endcomment %}
105+
{% when 'facebook_id' %}
106+
{% capture link %}https://facebook.com/{{ social[1] }}{% endcapture %}
107+
{% assign sameaslinks = sameaslinks | push: link %}
108+
{% when 'flickr_id' %}
109+
{% capture link %}https://www.flickr.com/{{ social[1] }}{% endcapture %}
110+
{% assign sameaslinks = sameaslinks | push: link %}
111+
{% when 'github_username' %}
112+
{% capture link %}https://github.com/{{ social[1] }}{% endcapture %}
113+
{% assign sameaslinks = sameaslinks | push: link %}
114+
{% when 'gitlab_username' %}
115+
{% capture link %}https://gitlab.com/{{ social[1] }}{% endcapture %}
116+
{% assign sameaslinks = sameaslinks | push: link %}
117+
{% when 'hal_id' %}
118+
{% capture link %}https://cv.hal.science/{{ social[1] }}/{% endcapture %}
119+
{% assign sameaslinks = sameaslinks | push: link %}
120+
{% when 'ieee_id' %}
121+
{% capture link %}https://ieeexplore.ieee.org/author/{{ social[1] }}/{% endcapture %}
122+
{% assign sameaslinks = sameaslinks | push: link %}
123+
{% when 'inspirehep_id' %}
124+
{% capture link %}https://inspirehep.net/authors/{{ social[1] }}{% endcapture %}
125+
{% assign sameaslinks = sameaslinks | push: link %}
126+
{% when 'instagram_id' %}
127+
{% capture link %}https://instagram.com/{{ social[1] }}{% endcapture %}
128+
{% assign sameaslinks = sameaslinks | push: link %}
129+
{% when 'kaggle_id' %}
130+
{% capture link %}https://www.kaggle.com/{{ social[1] }}{% endcapture %}
131+
{% assign sameaslinks = sameaslinks | push: link %}
132+
{% when 'keybase_username' %}
133+
{% capture link %}https://keybase.io/{{ social[1] }}{% endcapture %}
134+
{% assign sameaslinks = sameaslinks | push: link %}
135+
{% when 'lastfm_id' %}
136+
{% capture link %}https://www.last.fm/user/{{ social[1] }}{% endcapture %}
137+
{% assign sameaslinks = sameaslinks | push: link %}
138+
{% when 'lattes_id' %}
139+
{% capture link %}http://lattes.cnpq.br/{{ social[1] }}{% endcapture %}
140+
{% assign sameaslinks = sameaslinks | push: link %}
141+
{% when 'leetcode_id' %}
142+
{% capture link %}https://leetcode.com/u/{{ social[1] }}/{% endcapture %}
143+
{% assign sameaslinks = sameaslinks | push: link %}
144+
{% when 'linkedin_username' %}
145+
{% capture link %}https://www.linkedin.com/in/{{ social[1] }}{% endcapture %}
146+
{% assign sameaslinks = sameaslinks | push: link %}
147+
{% when 'mastodon_username' %}
148+
{% capture link %}https://{{ social[1] }}{% endcapture %}
149+
{% assign sameaslinks = sameaslinks | push: link %}
150+
{% when 'medium_username' %}
151+
{% capture link %}https://medium.com/@{{ social[1] }}{% endcapture %}
152+
{% assign sameaslinks = sameaslinks | push: link %}
153+
{% when 'orcid_id' %}
154+
{% capture link %}https://orcid.org/{{ social[1] }}{% endcapture %}
155+
{% assign sameaslinks = sameaslinks | push: link %}
156+
{% when 'osf_id' %}
157+
{% capture link %}https://osf.io/{{ social[1] }}/{% endcapture %}
158+
{% assign sameaslinks = sameaslinks | push: link %}
159+
{% when 'pinterest_id' %}
160+
{% capture link %}https://www.pinterest.com/{{ social[1] }}{% endcapture %}
161+
{% assign sameaslinks = sameaslinks | push: link %}
162+
{% when 'publons_id' %}
163+
{% capture link %}https://publons.com/a/{{ social[1] }}/{% endcapture %}
164+
{% assign sameaslinks = sameaslinks | push: link %}
165+
{% when 'quora_username' %}
166+
{% capture link %}https://www.quora.com/profile/{{ social[1] }}{% endcapture %}
167+
{% assign sameaslinks = sameaslinks | push: link %}
168+
{% when 'research_gate_profile' %}
169+
{% capture link %}https://www.researchgate.net/profile/{{ social[1] }}/{% endcapture %}
170+
{% assign sameaslinks = sameaslinks | push: link %}
171+
{% when 'rss_icon' %}
172+
{% comment %}
173+
{% capture link %}{{ site.baseurl }}/feed.xml{% endcapture %}
174+
{% assign sameaslinks = sameaslinks | push: link %}
175+
{% endcomment %}
176+
{% when 'scholar_userid' %}
177+
{% capture link %}https://scholar.google.com/citations?user={{ social[1] }}{% endcapture %}
178+
{% assign sameaslinks = sameaslinks | push: link %}
179+
{% when 'scopus_id' %}
180+
{% capture link %}https://www.scopus.com/authid/detail.uri?authorId={{ social[1] }}{% endcapture %}
181+
{% assign sameaslinks = sameaslinks | push: link %}
182+
{% when 'semanticscholar_id' %}
183+
{% capture link %}https://www.semanticscholar.org/author/{{ social[1] }}{% endcapture %}
184+
{% assign sameaslinks = sameaslinks | push: link %}
185+
{% when 'spotify_id' %}
186+
{% capture link %}https://open.spotify.com/user/{{ social[1] }}{% endcapture %}
187+
{% assign sameaslinks = sameaslinks | push: link %}
188+
{% when 'stackoverflow_id' %}
189+
{% capture link %}https://stackoverflow.com/users/{{ social[1] }}{% endcapture %}
190+
{% assign sameaslinks = sameaslinks | push: link %}
191+
{% when 'strava_userid' %}
192+
{% capture link %}https://www.strava.com/athletes/{{ social[1] }}{% endcapture %}
193+
{% assign sameaslinks = sameaslinks | push: link %}
194+
{% when 'telegram_username' %}
195+
{% capture link %}https://telegram.me/{{ social[1] }}{% endcapture %}
196+
{% assign sameaslinks = sameaslinks | push: link %}
197+
{% when 'unsplash_id' %}
198+
{% capture link %}https://unsplash.com/@{{ social[1] }}{% endcapture %}
199+
{% assign sameaslinks = sameaslinks | push: link %}
200+
{% when 'whatsapp_number' %}
201+
{% capture link %}https://wa.me/{{ social[1] }}{% endcapture %}
202+
{% assign sameaslinks = sameaslinks | push: link %}
203+
{% when 'wikidata_id' %}
204+
{% capture link %}https://www.wikidata.org/wiki/{{ social[1] }}{% endcapture %}
205+
{% assign sameaslinks = sameaslinks | push: link %}
206+
{% when 'wikipedia_id' %}
207+
{% capture link %}https://wikipedia.org/wiki/User:{{ social[1] }}{% endcapture %}
208+
{% assign sameaslinks = sameaslinks | push: link %}
209+
{% when 'work_url' %}
210+
{% capture link %}{{ social[1] }}{% endcapture %}
211+
{% assign sameaslinks = sameaslinks | push: link %}
212+
{% when 'x_username' %}
213+
{% capture link %}https://twitter.com/{{ social[1] }}{% endcapture %}
214+
{% assign sameaslinks = sameaslinks | push: link %}
215+
{% when 'youtube_id' %}
216+
{% capture link %}https://youtube.com/@{{ social[1] }}{% endcapture %}
217+
{% assign sameaslinks = sameaslinks | push: link %}
218+
{% when 'zotero_username' %}
219+
{% capture link %}https://www.zotero.org/{{ social[1] }}{% endcapture %}
220+
{% assign sameaslinks = sameaslinks | push: link %}
221+
{% else %}
222+
{% assign sameaslinks = sameaslinks | push: social[1].url %}
223+
{% endcase %}
224+
{% endfor %}
222225

223226
<script type="application/ld+json">
224227
{
@@ -232,7 +235,7 @@
232235
"description": "{% if page.description %}{{ page.description }}{% else if site.description %}{{ site.description }}{% endif %}",
233236
"headline": "{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}",
234237
{% if sameaslinks != blank %}
235-
"sameAs": {{ sameaslinks }},
238+
"sameAs": {{ sameaslinks | jsonify }},
236239
{% endif %}
237240
"name": "{{ author_name }}",
238241
"@context": "https://schema.org"

_includes/related_posts.liquid

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
{% for post in site.related_posts | limit: site.related_blog_posts.max_related %}
33
{% unless have_related_posts %}
44
{% assign have_related_posts = true %}
5-
<br>
6-
<hr>
7-
<br>
8-
<ul class="list-disc pl-8"></ul>
5+
{% if page.layout == 'post' %}
6+
<br>
7+
<hr>
8+
<br>
9+
<ul class="list-disc pl-8"></ul>
10+
11+
<!-- Adds related posts to the end of an article -->
12+
<h2 class="text-3xl font-semibold mb-4 mt-12">Enjoy Reading This Article?</h2>
13+
{% else %}
14+
<h2 class="text-3xl font-semibold mb-4 mt-12">Enjoy Reading This Article?</h2>
15+
{% endif %}
916

10-
<!-- Adds related posts to the end of an article -->
11-
<h2 class="text-3xl font-semibold mb-4 mt-12">Enjoy Reading This Article?</h2>
1217
<p class="mb-2">Here are some more articles you might like to read next:</p>
1318
{% endunless %}
1419

0 commit comments

Comments
 (0)