diff --git a/_config.yml b/_config.yml index d6f84c57815..81624d6e1ed 100644 --- a/_config.yml +++ b/_config.yml @@ -28,6 +28,9 @@ url: "" github: username: github_username # change to your GitHub username +gitlab: + username: gitlab_username # change to your GitLab username + twitter: username: twitter_username # change to your Twitter username diff --git a/_data/contact.yml b/_data/contact.yml index ed40acb7e97..e27815fe636 100644 --- a/_data/contact.yml +++ b/_data/contact.yml @@ -3,6 +3,9 @@ - type: github icon: "fab fa-github" +- type: gitlab + icon: "fab fa-gitlab" + - type: twitter icon: "fa-brands fa-x-twitter" diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 569585f6f24..1a4ded02aaf 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -53,10 +53,14 @@ {% for entry in site.data.contact %} {% case entry.type %} - {% when 'github', 'twitter' %} - {%- capture url -%} - https://{{ entry.type }}.com/{{ site[entry.type].username }} - {%- endcapture -%} + {% when 'github', 'gitlab', 'twitter' %} + {% if site[entry.type].username %} + {%- capture url -%} + https://{{ entry.type }}.com/{{ site[entry.type].username }} + {%- endcapture -%} + {% else %} + {% assign url = nil %} + {% endif %} {% when 'email' %} {% assign email = site.social.email | split: '@' %} {%- capture url -%}