Sha256: 2782ebcec3a437a7746cbb7e135a73eb16f18ae6c88f3e078b16cc664e523c4f
Contents?: true
Size: 995 Bytes
Versions: 12
Compression:
Stored size: 995 Bytes
Contents
{%- comment -%} Include as: {%- include_cached favicon.html -%} Depends on: site.static_files. Results in: HTML for a link to an existing `favicon.ico` file. Overwrites: file. The endoflife.date site has 226 pages and 3410 static files. @marcwrobel pointed out that the time taken by evaluating the code in this file on every page when building that site was significant, and suggested making it optional. As it is page-independent, it can easily be cached. Doing that reduced the time taken by rendering `_includes/head.html` from 15.294s to 10.760s, thereby reducing the total build time from 26.074s to 21.656s -- a saving of about 17%. {%- endcomment -%} {% for file in site.static_files %} {% if file.path == site.favicon_ico or file.path == '/favicon.ico' %} {% assign favicon = true %} {% endif %} {% endfor %} {% if favicon %} <link rel="icon" href="{{ site.favicon_ico | default: '/favicon.ico' | relative_url }}" type="image/x-icon"> {% endif %}
Version data entries
12 entries across 12 versions & 2 rubygems