Kill multiple touch icons, add favicon

This commit is contained in:
Michal Jirku 2020-11-26 00:20:13 +01:00
parent 62f222050c
commit 7ee6cc7375

View file

@ -12,14 +12,13 @@
<script src="{{ "/assets/js/sidenotes.js" | relative_url }}"></script> <script src="{{ "/assets/js/sidenotes.js" | relative_url }}"></script>
<!-- Favicon --> <!-- Favicon -->
{% assign apple_res = "152x152,180x180,167x167" | split: ',' -%}
{% for file in site.static_files -%} {% for file in site.static_files -%}
{% if file.path contains '/assets/favicon-' -%} {% if file.path contains '/assets/favicon-' -%}
{% assign parts = file.basename | split: '-' %} <link rel="icon" type="image/png" sizes="{{ parts[1] }}" href="{{ file.path | relative_url }}"> {% assign parts = file.basename | split: '-' %} <link rel="icon" type="image/png" sizes="{{ parts[1] }}" href="{{ file.path | relative_url }}">
{% if apple_res contains parts[1] %} <link rel="apple-touch-icon" sizes="{{ parts[1] }}" href="{{ file.path | relative_url }}">
{% endif -%}
{% endif -%} {% endif -%}
{% endfor %} {% endfor %}
<link rel="shortcut icon" href="{{ 'favicon.ico' | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- RSS --> <!-- RSS -->
{% feed_meta %} {% feed_meta %}