mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-10-20 17:53:45 +00:00
fix: avoid unconfigured social options in sidebar (#2507)
This commit is contained in:
parent
eaf5e57449
commit
5f8ec7ffd3
@ -52,13 +52,21 @@
|
|||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
{% for entry in site.data.contact %}
|
{% for entry in site.data.contact %}
|
||||||
|
{%- assign url = null -%}
|
||||||
|
|
||||||
{% case entry.type %}
|
{% case entry.type %}
|
||||||
{% when 'github', 'twitter' %}
|
{% when 'github', 'twitter' %}
|
||||||
|
{%- unless site[entry.type].username -%}
|
||||||
|
{%- continue -%}
|
||||||
|
{%- endunless -%}
|
||||||
{%- capture url -%}
|
{%- capture url -%}
|
||||||
https://{{ entry.type }}.com/{{ site[entry.type].username }}
|
https://{{ entry.type }}.com/{{ site[entry.type].username }}
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
{% when 'email' %}
|
{% when 'email' %}
|
||||||
{% assign email = site.social.email | split: '@' %}
|
{%- unless site.social.email -%}
|
||||||
|
{%- continue -%}
|
||||||
|
{%- endunless -%}
|
||||||
|
{%- assign email = site.social.email | split: '@' -%}
|
||||||
{%- capture url -%}
|
{%- capture url -%}
|
||||||
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user