Cachebust favicon

pull/1/head
mat ess 2022-08-14 13:05:27 -04:00
parent 55b4c0c02e
commit bbd921e1c9
2 changed files with 4 additions and 3 deletions

View File

@ -19,13 +19,13 @@
{# Favicon #}
{% if config.extra.favicon %}
{% set favicon_ext = config.extra.favicon | split(pat=".") | last %}
<link rel="icon" type="image/{{ favicon_ext }}" href={{ config.extra.favicon }} />
<link rel="icon" type="image/{{ favicon_ext }}" href="{{ get_url(path=config.extra.favicon, cachebust=true) }}" />
{% endif %}
{# Font from cdn or disk #}
{% if config.extra.use_cdn | default(value=false) %}
{% for cdn in config.extra.cdns %}
<link href={{ cdn.url }} rel="stylesheet" integrity="sha384-{{ cdn.hash }}" crossorigin="anonymous">
<link href="{{ cdn.url }}" rel="stylesheet" integrity="sha384-{{ cdn.hash }}" crossorigin="anonymous">
{% endfor %}
{% else %}
<link href="{{ get_url(path='style/fonts.css', cachebust=true) }}" rel="stylesheet" />

View File

@ -1,6 +1,7 @@
<header>
<div class="main brand">
<a href={{ config.base_url }}><img class=logo src="/image/favicon.svg" alt="" />{{ config.title }}</a>
<a href={{ config.base_url }}><img class=logo src="{{ get_url(path=config.extra.favicon, cachebust=true) }}"
alt="" />{{ config.title }}</a>
</div>
<nav aria-label="Site navigation">