Loads font-awesome asynchronously (#2967)

Loading font-awesome asynchronously allows to display the site faster. This change is advised by google pagespeed insights
This commit is contained in:
Guillaume Gautreau 2021-06-23 14:10:12 +02:00 committed by GitHub
parent 184f4f3430
commit 7597735c73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,8 @@
<!-- For all browsers -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>
<!--[if IE]>
<style>
@ -36,4 +37,4 @@
{% for script in site.head_scripts %}
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
{% endif %}