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 #} {# Favicon #}
{% if config.extra.favicon %} {% if config.extra.favicon %}
{% set favicon_ext = config.extra.favicon | split(pat=".") | last %} {% 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 %} {% endif %}
{# Font from cdn or disk #} {# Font from cdn or disk #}
{% if config.extra.use_cdn | default(value=false) %} {% if config.extra.use_cdn | default(value=false) %}
{% for cdn in config.extra.cdns %} {% 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 %} {% endfor %}
{% else %} {% else %}
<link href="{{ get_url(path='style/fonts.css', cachebust=true) }}" rel="stylesheet" /> <link href="{{ get_url(path='style/fonts.css', cachebust=true) }}" rel="stylesheet" />

View File

@ -1,6 +1,7 @@
<header> <header>
<div class="main brand"> <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> </div>
<nav aria-label="Site navigation"> <nav aria-label="Site navigation">