{% for social in socials %} {% set raw_social_link = social.link if (social.link is defined and social.link) else (social.url if (social.url is defined and social.url) else "") %} {% set social_link = raw_social_link if (not raw_social_link or "://" in raw_social_link or raw_social_link[:7] == "mailto:" or raw_social_link[:4] == "tel:" or raw_social_link[:1] == "#" or raw_social_link[:1] == "/") else (raw_social_link | url) %} {% set social_title = social.title if (social.title is defined and social.title) else (social.type if (social.type is defined and social.type) else "") %} {% set social_key = (social.type if (social.type is defined and social.type) else social_title) | lower %} {% set raw_icon = social.icon if (social.icon is defined and social.icon) else (default_social_icons[social_key] if social_key in default_social_icons else "fontawesome/solid/link") %} {% set icon_with_ext = raw_icon if raw_icon[-4:] == ".svg" else (raw_icon ~ ".svg") %} {% set icon_path = icon_with_ext if icon_with_ext[:7] == ".icons/" else (".icons/" ~ icon_with_ext) %} {% if social_link %} {% include icon_path %} {% endif %} {% endfor %}
{% endif %}