Skip to content

Commit

Permalink
Discord supports old and new invite code styles (daattali#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico is LOST authored May 15, 2023
1 parent cdfd011 commit 8c14933
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ social-network-links:
# mastodon: instance.url/@username
# ORCID: your ORCID ID
# google-scholar: your google scholar
# discord: invite/invite_code or users/userid
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# kaggle: yourname
# hackerrank: yourname

Expand Down
6 changes: 5 additions & 1 deletion _includes/social-networks-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,12 @@
{%- endif -%}

{%- if site.social-network-links.discord -%}
{% assign discord_start = site.social-network-links.discord | split: "/" | first -%}
{% unless discord_start == 'users' or discord_start == 'invite' -%}
{% assign discord_url_prefix = 'invite/' -%}
{% endunless -%}
<li class="list-inline-item">
<a href="https://discord.com/{{ site.social-network-links.discord }}" title="Discord">
<a href="https://discord.com/{{discord_url_prefix}}{{site.social-network-links.discord}}" title="Discord">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-discord fa-stack-1x fa-inverse"></i>
Expand Down

0 comments on commit 8c14933

Please sign in to comment.