{%- macro icon_link_nav_item(url, icon, name) -%}
  {%- if url | length > 2 %}
        <li class="nav-item">
          <a class="nav-link" href="{{ url }}" rel="noopener" target="_blank" title="{{ _(name) }}">
            <span><i class="{{ icon }}"></i></span>
            <label class="sr-only">{{ _(name) }}</label>
          </a>
        </li>
  {%- endif -%}
{%- endmacro -%}

      <ul id="navbar-icon-links" class="navbar-nav" aria-label="{{ _(theme_icon_links_label) }}">
        {%- block icon_link_shortcuts -%}
        {% if theme_github_url | length > 2 %}
          <li class="nav-item">
            <a class="nav-link github-button" href="{{ theme_github_url }}" rel="noopener" target="_blank" title="{{ _(name) }}">
              <div class="github-icon"><i class="fab fa-github"></i></div>
            </a>
          </li>
        {% endif %}
        {{ icon_link_nav_item(theme_gitlab_url, "fab fa-gitlab", "GitLab") -}}
        {{ icon_link_nav_item(theme_twitter_url, "fab fa-twitter-square", "Twitter") -}}
        {% endblock -%}
        {%- for icon_link in theme_icon_links -%}
        {{ icon_link_nav_item(icon_link["url"], icon_link["icon"], icon_link["name"]) -}}
        {%- endfor %}
      </ul>
