Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions _data/contact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
- type: github
icon: "fab fa-github"

- type: gitlab
icon: "fab fa-gitlab"

- type: twitter
icon: "fa-brands fa-x-twitter"

Expand Down
12 changes: 8 additions & 4 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down