diff --git a/_config.yml b/_config.yml index 5a9dc736bd30..a4d3a918d3b5 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/_includes/social-networks-links.html b/_includes/social-networks-links.html index 8ca4c6d2a5e7..6ca15a0dbc64 100644 --- a/_includes/social-networks-links.html +++ b/_includes/social-networks-links.html @@ -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 -%}