- <link rel="shortcut icon" type="image/x-icon" href="{{ asset(site.ico) }}" />
- <link rel="icon" type="image/svg+xml" href="{{ asset(site.svg) }}" />
- {% for size, icon in site.png %}
- {# Apple #}
- {% if size in [120, 152, 167, 180] %}
- {% if size == 180 %}
- <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
+ {% if site is defined and site %}
+ <link rel="shortcut icon" type="image/x-icon" href="{{ asset(site.icon.ico) }}" />
+ <link rel="icon" type="image/svg+xml" href="{{ asset(site.icon.svg) }}" />
+ {% for size, icon in site.png %}
+ {# Apple #}
+ {% if size in [120, 152, 167, 180] %}
+ {% if size == 180 %}
+ <link rel="apple-touch-icon" href="{{ asset(icon) }}" />
+ {% endif %}
+ <link rel="apple-touch-icon" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />
+ {# Windows #}
+ {% elseif size in [70, 150, 310] %}
+ <meta name="msapplication-square{{ size }}x{{ size }}logo" content="{{ asset(icon) }}" />
+ {# Others #}
+ {% else %}
+ <link rel="icon" type="image/png" sizes="{{ size }}x{{ size }}" href="{{ asset(icon) }}" />