Autogen apple-touch-icons too

This commit is contained in:
Michal Jirku 2020-11-25 21:59:09 +01:00
parent 1bf6027bb9
commit 62f222050c
2 changed files with 3 additions and 1 deletions

View File

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

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB