File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 5252 {% endunless %}
5353
5454 {% for entry in site.data.contact %}
55+ {%- assign url = null -%}
56+
5557 {% case entry.type %}
5658 {% when 'github', 'twitter' %}
57- {% if site[entry.type].username %}
58- {%- capture url -%}
59- https://{{ entry.type }}.com/{{ site[entry.type].username }}
60- {%- endcapture -%}
61- {% else %}
62- {% assign url = nil %}
63- {% endif %}
59+ {%- unless site[entry.type].username -%}
60+ {%- continue -%}
61+ {%- endunless -%}
62+ {%- capture url -%}
63+ https://{{ entry.type }}.com/{{ site[entry.type].username }}
64+ {%- endcapture -%}
6465 {% when 'email' %}
65- {% assign email = site.social.email | split: '@' %}
66+ {%- unless site.social.email -%}
67+ {%- continue -%}
68+ {%- endunless -%}
69+ {%- assign email = site.social.email | split: '@' -%}
6670 {%- capture url -%}
6771 javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
6872 {%- endcapture -%}
You can’t perform that action at this time.
0 commit comments